use JSON stopfinder for Munich

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@874 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2012-01-21 01:03:04 +00:00
parent a58b7a6003
commit e2e6b0324d
2 changed files with 4 additions and 1 deletions

View file

@ -136,6 +136,9 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
appendCommonRequestParams(uri, "JSON");
uri.append("&locationServerActive=1");
appendLocation(uri, constraint, "sf");
if (constraint.type == LocationType.ANY)
// 1=place 2=stop 4=street 8=address 16=crossing 32=poi 64=postcode
uri.append("&anyObjFilter_sf=").append(2 + 4 + 8 + 16 + 32 + 64);
// System.out.println(uri.toString());

View file

@ -68,7 +68,7 @@ public class MvvProvider extends AbstractEfaProvider
@Override
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
{
return xmlStopfinderRequest(new Location(LocationType.ANY, 0, null, constraint.toString()));
return jsonStopfinderRequest(new Location(LocationType.ANY, 0, null, constraint.toString()));
}
private static final Map<String, int[]> LINES = new HashMap<String, int[]>();