Fixed missing longitude/ latitude variables for openstreetmap. Thank Jerome Rapinet.

svn: r17949
This commit is contained in:
Rob G. Healey 2011-07-24 09:06:51 +00:00
parent 3c15b42e98
commit efc97de594
2 changed files with 7 additions and 2 deletions

View File

@ -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);

View File

@ -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 "</script>",
# as it will be added automatically!