hasLocation() convenience methods

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@474 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-01-30 15:10:16 +00:00
parent 2cc93f99bd
commit 8b72c7cafe
5 changed files with 18 additions and 8 deletions

View file

@ -253,7 +253,7 @@ public final class BvgProvider extends AbstractHafasProvider
private static final void appendLocationBvg(final StringBuilder uri, final Location location, final String paramSuffix, final String paramWgs)
{
if (location.type == LocationType.ADDRESS && location.lat != 0 && location.lon != 0 && paramWgs != null)
if (location.type == LocationType.ADDRESS && location.hasLocation() && paramWgs != null)
{
uri.append("&").append(paramWgs).append("=").append(ParserUtils.urlEncode("A=16@X=" + location.lon + "@Y=" + location.lat));
}