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

@ -41,15 +41,12 @@ public class LinzProvider extends AbstractEfaProvider
return false;
}
private static final String AUTOCOMPLETE_URI = API_BASE + "XML_STOPFINDER_REQUEST"
+ "?outputFormat=XML&coordOutputFormat=WGS84&name_sf=%s&type_sf=%s";
private static final String AUTOCOMPLETE_TYPE = "any"; // any, stop, street, poi
private static final String ENCODING = "ISO-8859-1";
private static final String AUTOCOMPLETE_URI = API_BASE + "XSLT_TRIP_REQUEST2?outputFormat=XML&name_origin=%s&type_origin=any";
@Override
protected String autocompleteUri(final CharSequence constraint)
{
return String.format(AUTOCOMPLETE_URI, ParserUtils.urlEncode(constraint.toString(), ENCODING), AUTOCOMPLETE_TYPE);
return String.format(AUTOCOMPLETE_URI, ParserUtils.urlEncode(constraint.toString(), "ISO-8859-1"));
}
private static final String NEARBY_LATLON_URI = API_BASE