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

@ -72,13 +72,14 @@ public class SbbProvider extends AbstractHafasProvider
final Matcher mSingle = P_SINGLE_NAME.matcher(page);
if (mSingle.matches())
{
results.add(new Location(LocationType.STATION, Integer.parseInt(mSingle.group(2)), ParserUtils.resolveEntities(mSingle.group(1))));
results.add(new Location(LocationType.STATION, Integer.parseInt(mSingle.group(2)), 0, 0, ParserUtils.resolveEntities(mSingle.group(1))));
}
else
{
final Matcher mMulti = P_MULTI_NAME.matcher(page);
while (mMulti.find())
results.add(new Location(LocationType.STATION, Integer.parseInt(mMulti.group(1)), ParserUtils.resolveEntities(mMulti.group(2))));
results
.add(new Location(LocationType.STATION, Integer.parseInt(mMulti.group(1)), 0, 0, ParserUtils.resolveEntities(mMulti.group(2))));
}
return results;
@ -179,7 +180,7 @@ public class SbbProvider extends AbstractHafasProvider
{
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("REQ0JourneyStopsS0K"))