diff options
Diffstat (limited to 'main/src/cgeo/geocaching/geopoint/GeopointParser.java')
| -rw-r--r-- | main/src/cgeo/geocaching/geopoint/GeopointParser.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/geopoint/GeopointParser.java b/main/src/cgeo/geocaching/geopoint/GeopointParser.java index 2809598..b486f01 100644 --- a/main/src/cgeo/geocaching/geopoint/GeopointParser.java +++ b/main/src/cgeo/geocaching/geopoint/GeopointParser.java @@ -66,10 +66,10 @@ class GeopointParser { final double lat = latitudeWrapper.result; final double lon = longitudeWrapper.result; - if (lat > 90 || lat < -90) { + if (!Geopoint.isValidLatitude(lat)) { throw new Geopoint.ParseException(text, LatLon.LAT); } - if (lon > 180 || lon < -180) { + if (!Geopoint.isValidLongitude(lon)) { throw new Geopoint.ParseException(text, LatLon.LON); } return new Geopoint(lat, lon); |
