Fixed missing marker on PlacePage Map.

svn: r15574
This commit is contained in:
Rob G. Healey 2010-06-16 06:03:51 +00:00
parent 82cb3ff0cc
commit f5ef3abf53

View File

@ -359,7 +359,7 @@ class BasePage(object):
# add mapstraction javascript code # add mapstraction javascript code
fname = "/".join(["mapstraction", "mxn.js?(googlev3)"]) fname = "/".join(["mapstraction", "mxn.js?(googlev3)"])
url = self.report.build_url_fname(fname, None, self.up) 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 # Place Map division
with Html("div", id = "mapstraction") as mapstraction: with Html("div", id = "mapstraction") as mapstraction:
@ -383,7 +383,6 @@ class BasePage(object):
var map; var map;
var pprovider = 'googlev3'; var pprovider = 'googlev3';
var latlon; var latlon;
var icon = 'mainmap';
function initialize() { function initialize() {
@ -393,7 +392,7 @@ class BasePage(object):
// add map controls to image // add map controls to image
map.addControls({ map.addControls({
pan: true, pan: true,
zoom: 'large', zoom: 'medium',
scale: true, scale: true,
map_type: true map_type: true
}); });
@ -403,14 +402,19 @@ class BasePage(object):
jsc += """ jsc += """
// put map on page // put map on page
map.setCenterAndZoom(latlon, 9); map.setCenterAndZoom(latlon, 9);
//add a marker var point;
add_marker(); var points = []
point = new mxn.LatLonPoint(latlon);
points.push(point);
// add marker // add marker
var marker; var marker;
marker = new mxn.Marker(latlon); marker = new mxn.Marker(latlon);
map.addMarker(marker,true);
// add marker to map
map.addMarker(marker, true);
} }
//]]>""" //]]>"""