diff --git a/src/plugins/lib/libhtmlconst.py b/src/plugins/lib/libhtmlconst.py index 810ff9442..2d7040506 100644 --- a/src/plugins/lib/libhtmlconst.py +++ b/src/plugins/lib/libhtmlconst.py @@ -133,7 +133,7 @@ openstreet_jsc = """ map.dataLayer.events.register("visibilitychanged", map.dataLayer, toggleData); map.addLayer(map.dataLayer); - var centre = new OpenLayers.LonLat(%(lon)s, %(lat)s); + var centre = new OpenLayers.LonLat(%s, %s); var zoom = 11; setMapCenter(centre, zoom); diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 99438c594..281de63ff 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -2615,10 +2615,15 @@ class PlacePage(BasePage): with Html("script", type = "text/javascript") as jsc: if self.mapservice == "Google": head += jsc + + # in Google Maps, they use Latitude before Longitude jsc += google_jsc % (latitude, longitude) else: canvas += jsc - jsc += openstreet_jsc % Utils.xml_lang()[3:5].lower() + + # in OpenStreetMap, they use Longitude before Latitude + jsc += openstreet_jsc % (Utils.xml_lang()[3:5].lower(), + longitude, latitude) # there is no need to add an ending "", # as it will be added automatically!