mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-20 17:29:51 +00:00
added hasId() to Location
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@513 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
33e63d9b1f
commit
3b2b2bb675
5 changed files with 12 additions and 6 deletions
|
@ -564,7 +564,7 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
|
||||
private static final String location(final Location location)
|
||||
{
|
||||
if (location.type == LocationType.STATION && location.id != 0)
|
||||
if (location.type == LocationType.STATION && location.hasId())
|
||||
return "<Station externalId=\"" + location.id + "\" />";
|
||||
if (location.type == LocationType.POI && location.hasLocation())
|
||||
return "<Poi type=\"WGS84\" x=\"" + location.lon + "\" y=\"" + location.lat + "\" />";
|
||||
|
@ -582,7 +582,7 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
builder.append("@X=" + location.lon + "@Y=" + location.lat);
|
||||
if (location.name != null)
|
||||
builder.append("@G=" + location.name);
|
||||
if (location.type == LocationType.STATION && location.id != 0)
|
||||
if (location.type == LocationType.STATION && location.hasId())
|
||||
builder.append("@L=").append(location.id);
|
||||
return builder.toString();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue