aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorauric <>2015-02-02 16:04:16 +0100
committerauric <goldfinger.auric@gmail.com>2015-02-04 09:08:04 +0100
commit275181a01d068e9eb79ff12dcf53bf9ebbcb29ee (patch)
tree35833384829136c82722bfab4535475c98a37488 /main
parentbdb08e4ebca8b7e6cc3c00d98fbb9b1702c8a378 (diff)
downloadcgeo-275181a01d068e9eb79ff12dcf53bf9ebbcb29ee.zip
cgeo-275181a01d068e9eb79ff12dcf53bf9ebbcb29ee.tar.gz
cgeo-275181a01d068e9eb79ff12dcf53bf9ebbcb29ee.tar.bz2
Allow the export of waypoints without coordinates to Locus
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/apps/AbstractLocusApp.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/apps/AbstractLocusApp.java b/main/src/cgeo/geocaching/apps/AbstractLocusApp.java
index f070ae8..9f39604 100644
--- a/main/src/cgeo/geocaching/apps/AbstractLocusApp.java
+++ b/main/src/cgeo/geocaching/apps/AbstractLocusApp.java
@@ -147,18 +147,23 @@ public abstract class AbstractLocusApp extends AbstractApp {
if (withWaypoints && cache.hasWaypoints()) {
pg.waypoints = new ArrayList<>();
for (final Waypoint waypoint : cache.getWaypoints()) {
- if (waypoint == null || waypoint.getCoords() == null) {
+ if (waypoint == null) {
continue;
}
+
final PointGeocachingDataWaypoint wp = new PointGeocachingDataWaypoint();
- wp.code = waypoint.getGeocode();
+ wp.code = waypoint.getLookup();
wp.name = waypoint.getName();
+ wp.description = waypoint.getNote();
final String locusWpId = toLocusWaypoint(waypoint.getWaypointType());
if (locusWpId != null) {
wp.type = locusWpId;
}
- wp.lat = waypoint.getCoords().getLatitude();
- wp.lon = waypoint.getCoords().getLongitude();
+
+ if (waypoint.getCoords() != null) {
+ wp.lat = waypoint.getCoords().getLatitude();
+ wp.lon = waypoint.getCoords().getLongitude();
+ }
pg.waypoints.add(wp);
}
}
@@ -275,5 +280,4 @@ public abstract class AbstractLocusApp extends AbstractApp {
return null;
}
}
-
}