From 2176d106119e6806944c398061b4d37cb75121c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Mon, 8 Aug 2011 16:14:20 +0000 Subject: [PATCH] openstreet_jsc not initialized on body according to htmlconst svn: r18011 --- src/plugins/webreport/NarrativeWeb.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index e48aeae18..dffa38297 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -2606,13 +2606,15 @@ class PlacePage(BasePage): # begin inline javascript code # because jsc is a docstring, it does NOT have to be properly indented with Html("script", type = "text/javascript") as jsc: - head += jsc if self.mapservice == "Google": + head += jsc jsc += google_jsc % (latitude, longitude) else: + # do not need to write on head, load into canvas jsc += openstreet_jsc % (Utils.xml_lang()[3:5].lower(), longitude, latitude) + canvas += jsc # there is no need to add an ending "", # as it will be added automatically! @@ -2620,7 +2622,8 @@ class PlacePage(BasePage): canvas += fullclear # add javascript function call to body element - body.attr ='onload ="initialize();" ' + if self.mapservice == "Google": + body.attr ='onload ="initialize();" ' # source references srcrefs = self.display_ind_sources(place)