aboutsummaryrefslogtreecommitdiffstats
path: root/src/cgeo/geocaching/files/LocParser.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2011-09-15 14:59:42 +0200
committerSamuel Tardieu <sam@rfc1149.net>2011-09-15 15:14:49 +0200
commit880f483c345b687181027f0e0074ec4461039ba2 (patch)
treedbfcd909881065057de4fcc296bd92ce6002bbbe /src/cgeo/geocaching/files/LocParser.java
parent42b8d8542e4056ece23af2ff8ee2b5db8abe832b (diff)
downloadcgeo-880f483c345b687181027f0e0074ec4461039ba2.zip
cgeo-880f483c345b687181027f0e0074ec4461039ba2.tar.gz
cgeo-880f483c345b687181027f0e0074ec4461039ba2.tar.bz2
Use GeopointParser to parse coordinates
Diffstat (limited to 'src/cgeo/geocaching/files/LocParser.java')
-rw-r--r--src/cgeo/geocaching/files/LocParser.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cgeo/geocaching/files/LocParser.java b/src/cgeo/geocaching/files/LocParser.java
index 34ef7f1..240d61d 100644
--- a/src/cgeo/geocaching/files/LocParser.java
+++ b/src/cgeo/geocaching/files/LocParser.java
@@ -1,6 +1,5 @@
package cgeo.geocaching.files;
-import cgeo.geocaching.cgBase;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgCacheWrap;
import cgeo.geocaching.cgCoord;
@@ -8,7 +7,7 @@ import cgeo.geocaching.cgSearch;
import cgeo.geocaching.cgSettings;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.enumerations.CacheSize;
-import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.geopoint.GeopointParser;
import org.apache.commons.lang3.StringUtils;
@@ -96,10 +95,8 @@ public final class LocParser extends FileParser {
final Matcher matcherLat = patternLat.matcher(pointString);
final Matcher matcherLon = patternLon.matcher(pointString);
if (matcherLat.find() && matcherLon.find()) {
- final Map<String, Object> tmpLat = cgBase.parseCoordinate(matcherLat.group(1).trim(), "lat");
- final Map<String, Object> tmpLon = cgBase.parseCoordinate(matcherLon.group(1).trim(), "lon");
- pointCoord.coords = new Geopoint((Double) tmpLat.get("coordinate"),
- (Double) tmpLon.get("coordinate"));
+ pointCoord.coords =
+ GeopointParser.parse(matcherLat.group(1).trim(), matcherLon.group(1).trim());
}
final Matcher matcherDifficulty = patternDifficulty.matcher(pointString);
if (matcherDifficulty.find()) {