Skip to content

Commit

Permalink
Openlayers js does not accept coords in DEG format.
Browse files Browse the repository at this point in the history
  • Loading branch information
SNoiraud committed Apr 10, 2024
1 parent 24309c8 commit 49a29f9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion gramps/plugins/webreport/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 49a29f9

Please sign in to comment.