mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
use stop finder if available for auto-completion
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@559 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
db6d9b4337
commit
cdc3ef140c
68 changed files with 1206 additions and 238 deletions
|
@ -17,10 +17,12 @@
|
|||
|
||||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -35,8 +37,12 @@ public class VrrProvider extends AbstractEfaProvider
|
|||
{
|
||||
public static final NetworkId NETWORK_ID = NetworkId.VRR;
|
||||
public static final String OLD_NETWORK_ID = "efa3.vrr.de";
|
||||
// private static final String API_BASE = "http://efa3.vrr.de/vrr_mobile/";
|
||||
private static final String API_BASE = "http://efa.vrr.de/standard/";
|
||||
private static final String API_BASE = "http://app.vrr.de/standard/";
|
||||
|
||||
public VrrProvider()
|
||||
{
|
||||
super(API_BASE, null);
|
||||
}
|
||||
|
||||
public NetworkId id()
|
||||
{
|
||||
|
@ -52,13 +58,10 @@ public class VrrProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String AUTOCOMPLETE_URI = API_BASE
|
||||
+ "XSLT_TRIP_REQUEST2?outputFormat=XML&coordOutputFormat=WGS84&type_origin=any&name_origin=%s";
|
||||
|
||||
@Override
|
||||
protected String autocompleteUri(final CharSequence constraint)
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
return String.format(AUTOCOMPLETE_URI, ParserUtils.urlEncode(constraint.toString(), "ISO-8859-1"));
|
||||
return xmlStopfinderRequest(constraint);
|
||||
}
|
||||
|
||||
private static final String NEARBY_LATLON_URI = API_BASE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue