From afdd7c74c36b2aa0c01a4705196517d493ddceaf Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Wed, 28 Jun 2017 17:36:58 +0200 Subject: [PATCH] Narrative web : crash using OSM when bad lat/lon Fixes : 10111 --- gramps/plugins/webreport/narrativeweb.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index 640512e59..6ccaf025f 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -4058,6 +4058,10 @@ class PlacePages(BasePage): latitude, longitude = conv_lat_lon(place.get_latitude(), place.get_longitude(), "D.D8") + if not longitude: + longitude = 0.0 + if not latitude: + latitude = 0.0 placetitle = place_name # add narrative-maps CSS... @@ -4127,8 +4131,7 @@ class PlacePages(BasePage): canvas += jsc param1 = xml_lang()[3:5].lower() jsc += MARKER_PATH % marker_path - jsc += OSM_MARKERS % ([[float(longitude), - float(latitude), + jsc += OSM_MARKERS % ([[longitude, latitude, placetitle]], longitude, latitude, 10)