location is populated with lat and lon if possible

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@248 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-10-08 18:50:52 +00:00
parent 19c9c269e2
commit 8797d02a4b
8 changed files with 66 additions and 43 deletions

View file

@ -93,13 +93,13 @@ public class MvvProvider extends AbstractEfaProvider
final int locationId = Integer.parseInt(mAutocompleteFine.group(3));
if (type.equals("stop"))
results.add(new Location(LocationType.STATION, locationId, location));
results.add(new Location(LocationType.STATION, locationId, 0, 0, location));
else if (type.equals("street"))
results.add(new Location(LocationType.ADDRESS, 0, location));
results.add(new Location(LocationType.ADDRESS, 0, 0, 0, location));
else if (type.equals("singlehouse"))
results.add(new Location(LocationType.ADDRESS, 0, location));
results.add(new Location(LocationType.ADDRESS, 0, 0, 0, location));
else if (type.equals("poi"))
results.add(new Location(LocationType.POI, 0, location));
results.add(new Location(LocationType.POI, 0, 0, 0, location));
else
throw new IllegalStateException("unknown type " + type + " on " + uri);
}
@ -364,7 +364,7 @@ public class MvvProvider extends AbstractEfaProvider
{
final String address = ParserUtils.resolveEntities(mAddresses.group(1)).trim();
if (!addresses.contains(address))
addresses.add(new Location(LocationType.ANY, 0, address));
addresses.add(new Location(LocationType.ANY, 0, 0, 0, address));
}
if (type.equals("name_origin"))