summaryrefslogtreecommitdiffstats
path: root/worldmap-save.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-12 19:01:27 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-12 21:30:56 -0800
commitb7e53aaee6703c27061037dfadd657f5fc301559 (patch)
treea589b40966ff019398c725917a8de8f173515fc2 /worldmap-save.c
parent4c87ccf952de33a0e62a4fbaf56457ce7359ed84 (diff)
downloadsubsurface-b7e53aaee6703c27061037dfadd657f5fc301559.tar.gz
Change from locations to dive sites in save-html and worldmap
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'worldmap-save.c')
-rw-r--r--worldmap-save.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/worldmap-save.c b/worldmap-save.c
index a7e9d82c2..22bfe583e 100644
--- a/worldmap-save.c
+++ b/worldmap-save.c
@@ -27,11 +27,11 @@ void writeMarkers(struct membuffer *b, const bool selected_only)
if (!dive->selected)
continue;
}
- if (dive->latitude.udeg == 0 && dive->longitude.udeg == 0)
+ struct dive_site *ds = get_dive_site_for_dive(dive);
+ if (!ds || !dive_site_has_gps_location(ds))
continue;
-
- put_degrees(b, dive->latitude, "temp = new google.maps.Marker({position: new google.maps.LatLng(", "");
- put_degrees(b, dive->longitude, ",", ")});\n");
+ put_degrees(b, ds->latitude, "temp = new google.maps.Marker({position: new google.maps.LatLng(", "");
+ put_degrees(b, ds->longitude, ",", ")});\n");
put_string(b, "markers.push(temp);\ntempinfowindow = new google.maps.InfoWindow({content: '<div id=\"content\">'+'<div id=\"siteNotice\">'+'</div>'+'<div id=\"bodyContent\">");
snprintf(pre, sizeof(pre), "<p>%s ", translate("gettextFromC", "Date:"));
put_HTML_date(b, dive, pre, "</p>");
@@ -49,7 +49,7 @@ void writeMarkers(struct membuffer *b, const bool selected_only)
put_HTML_watertemp(b, dive, pre, "</p>");
snprintf(pre, sizeof(pre), "<p>%s <b>", translate("gettextFromC", "Location:"));
put_string(b, pre);
- put_HTML_quoted(b, dive->location);
+ put_HTML_quoted(b, get_dive_location(dive));
put_string(b, "</b></p>");
snprintf(pre, sizeof(pre), "<p> %s ", translate("gettextFromC", "Notes:"));
put_HTML_notes(b, dive, pre, " </p>");