mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 16:40:30 +00:00
parse poiID and streetID, just in case
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@284 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
1872466fe4
commit
cbbcc42c94
1 changed files with 12 additions and 0 deletions
|
@ -120,6 +120,8 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
||||||
final String anyType = pp.getAttributeValue(null, "anyType");
|
final String anyType = pp.getAttributeValue(null, "anyType");
|
||||||
final String idStr = pp.getAttributeValue(null, "id");
|
final String idStr = pp.getAttributeValue(null, "id");
|
||||||
final String stopIdStr = pp.getAttributeValue(null, "stopID");
|
final String stopIdStr = pp.getAttributeValue(null, "stopID");
|
||||||
|
final String poiIdStr = pp.getAttributeValue(null, "poiID");
|
||||||
|
final String streetIdStr = pp.getAttributeValue(null, "streetID");
|
||||||
int lat = 0, lon = 0;
|
int lat = 0, lon = 0;
|
||||||
if ("WGS84".equals(pp.getAttributeValue(null, "mapName")))
|
if ("WGS84".equals(pp.getAttributeValue(null, "mapName")))
|
||||||
{
|
{
|
||||||
|
@ -159,6 +161,16 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
||||||
type = LocationType.ADDRESS;
|
type = LocationType.ADDRESS;
|
||||||
id = 0;
|
id = 0;
|
||||||
}
|
}
|
||||||
|
else if (poiIdStr != null)
|
||||||
|
{
|
||||||
|
type = LocationType.POI;
|
||||||
|
id = Integer.parseInt(poiIdStr);
|
||||||
|
}
|
||||||
|
else if (streetIdStr != null)
|
||||||
|
{
|
||||||
|
type = LocationType.ADDRESS;
|
||||||
|
id = Integer.parseInt(streetIdStr);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("unknown type: " + anyType + " " + idStr + " " + stopIdStr);
|
throw new IllegalArgumentException("unknown type: " + anyType + " " + idStr + " " + stopIdStr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue