From f5ef3abf531034a25492103f0770345648a28d27 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Wed, 16 Jun 2010 06:03:51 +0000 Subject: [PATCH] Fixed missing marker on PlacePage Map. svn: r15574 --- src/plugins/webreport/NarrativeWeb.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index f98639e82..ffe6b7ef2 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -359,7 +359,7 @@ class BasePage(object): # add mapstraction javascript code fname = "/".join(["mapstraction", "mxn.js?(googlev3)"]) url = self.report.build_url_fname(fname, None, self.up) - head += Html("script", src = url, inline = True) + head += Html("script", type = "text/javascript", src = url, inline = True) # Place Map division with Html("div", id = "mapstraction") as mapstraction: @@ -383,7 +383,6 @@ class BasePage(object): var map; var pprovider = 'googlev3'; var latlon; - var icon = 'mainmap'; function initialize() { @@ -393,7 +392,7 @@ class BasePage(object): // add map controls to image map.addControls({ pan: true, - zoom: 'large', + zoom: 'medium', scale: true, map_type: true }); @@ -403,14 +402,19 @@ class BasePage(object): jsc += """ // put map on page map.setCenterAndZoom(latlon, 9); - - //add a marker - add_marker(); + + var point; + var points = [] + + point = new mxn.LatLonPoint(latlon); + points.push(point); // add marker var marker; marker = new mxn.Marker(latlon); - map.addMarker(marker,true); + + // add marker to map + map.addMarker(marker, true); } //]]>"""