From 49a29f9253554441befd88fb93f3d868e3eb6359 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Wed, 10 Apr 2024 18:23:15 +0200 Subject: [PATCH] Openlayers js does not accept coords in DEG format. --- gramps/plugins/webreport/person.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gramps/plugins/webreport/person.py b/gramps/plugins/webreport/person.py index f99882d17cb..f1822f7bdc4 100644 --- a/gramps/plugins/webreport/person.py +++ b/gramps/plugins/webreport/person.py @@ -838,6 +838,11 @@ def __create_family_map(self, person, place_lat_long): number_markers = len(place_lat_long) if number_markers > 1: for latitude, longitude, placetitle, handle, event in place_lat_long: + latitude, longitude = conv_lat_lon( + latitude, + longitude, + "D.D8" + ) xwidth.append(latitude) yheight.append(longitude) xwidth.sort() @@ -854,7 +859,9 @@ def __create_family_map(self, person, place_lat_long): midy_ = str(Decimal((miny + maxy) / 2)) midx_, midy_ = conv_lat_lon( - midx_, midy_, coord_formats[self.report.options["coord_format"]] + midx_, + midy_, + "D.D8" ) # get the integer span of latitude and longitude @@ -1154,6 +1161,11 @@ def __create_family_map(self, person, place_lat_long): # we are using OpenStreetMap elif self.mapservice == "OpenStreetMap": if midy_ is None: + latitude, longitude = conv_lat_lon( + latitude, + longitude, + "D.D8" + ) jsc += OSM_MARKERS % ( "markers", tracelife,