autocomplete for all efa based providers

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@245 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-10-06 11:36:18 +00:00
parent b11faf1cd7
commit b4bf75d875
10 changed files with 250 additions and 41 deletions

View file

@ -42,13 +42,12 @@ public class GvhProvider extends AbstractEfaProvider
}
private static final String AUTOCOMPLETE_URI = API_BASE
+ "XML_STOPFINDER_REQUEST?outputFormat=XML&coordOutputFormat=WGS84&name_sf=%s&type_sf=any";
private static final String ENCODING = "ISO-8859-1";
+ "XSLT_TRIP_REQUEST2?outputFormat=XML&locationServerActive=1&type_origin=any&name_origin=%s";
@Override
protected String autocompleteUri(final CharSequence constraint)
{
return String.format(AUTOCOMPLETE_URI, ParserUtils.urlEncode(constraint.toString(), ENCODING));
return String.format(AUTOCOMPLETE_URI, ParserUtils.urlEncode(constraint.toString(), "ISO-8859-1"));
}
private static final String NEARBY_STATION_URI = API_BASE