Enabled the marker for the place in the place map. Click on a marker and watch...
svn: r17927
This commit is contained in:
parent
473c809e39
commit
88f97a0501
@ -1131,11 +1131,10 @@ class BasePage(object):
|
|||||||
# Header constants
|
# Header constants
|
||||||
xmllang = Utils.xml_lang()
|
xmllang = Utils.xml_lang()
|
||||||
_META1 = 'name="generator" content="%s %s %s"' % (
|
_META1 = 'name="generator" content="%s %s %s"' % (
|
||||||
const.PROGRAM_NAME, const.VERSION, const.URL_HOMEPAGE
|
const.PROGRAM_NAME, const.VERSION, const.URL_HOMEPAGE)
|
||||||
)
|
|
||||||
_META2 = 'name="author" content="%s"' % self.author
|
_META2 = 'name="author" content="%s"' % self.author
|
||||||
_META3 = 'name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" '
|
_META3 = 'name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" '
|
||||||
_META4 = 'http-equiv="content-type" content="text/html; charsetset=%s" ' % xmllang
|
|
||||||
|
|
||||||
page, head, body = Html.page('%s - %s' %
|
page, head, body = Html.page('%s - %s' %
|
||||||
(html_escape(self.title_str),
|
(html_escape(self.title_str),
|
||||||
@ -1150,7 +1149,6 @@ class BasePage(object):
|
|||||||
meta = Html("meta", attr = _META1) + (
|
meta = Html("meta", attr = _META1) + (
|
||||||
Html("meta", attr = _META2, indent = False),
|
Html("meta", attr = _META2, indent = False),
|
||||||
Html("meta", attr = _META3, indent =False),
|
Html("meta", attr = _META3, indent =False),
|
||||||
Html("meta", attr = _META4, indent =False)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Link to _NARRATIVESCREEN stylesheet
|
# Link to _NARRATIVESCREEN stylesheet
|
||||||
@ -2628,17 +2626,37 @@ class PlacePage(BasePage):
|
|||||||
head += jsc
|
head += jsc
|
||||||
|
|
||||||
jsc += """
|
jsc += """
|
||||||
function initialize() {
|
var myLatlng = new google.maps.LatLng(%s, %s);""" % (latitude, longitude)
|
||||||
var myLatlng = new google.maps.LatLng(%s, %s);""" % (
|
|
||||||
latitude, longitude)
|
|
||||||
|
|
||||||
jsc += """
|
jsc += """
|
||||||
var myOptions = {
|
var marker;
|
||||||
zoom: 8,
|
var map;
|
||||||
center: myLatlng,
|
|
||||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
function initialize() {
|
||||||
|
var mapOptions = {
|
||||||
|
zoom: 13,
|
||||||
|
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
||||||
|
center: myLatlng
|
||||||
|
};
|
||||||
|
map = new google.maps.Map(document.getElementById("middle"), mapOptions);
|
||||||
|
|
||||||
|
marker = new google.maps.Marker({
|
||||||
|
map: map,
|
||||||
|
draggable: true,
|
||||||
|
animation: google.maps.Animation.DROP,
|
||||||
|
position: myLatlng
|
||||||
|
});
|
||||||
|
|
||||||
|
google.maps.event.addListener(marker, 'click', toggleBounce);
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleBounce() {
|
||||||
|
|
||||||
|
if (marker.getAnimation() != null) {
|
||||||
|
marker.setAnimation(null);
|
||||||
|
} else {
|
||||||
|
marker.setAnimation(google.maps.Animation.BOUNCE);
|
||||||
}
|
}
|
||||||
var map = new google.maps.Map(document.getElementById("middle"), myOptions);
|
|
||||||
}"""
|
}"""
|
||||||
# there is no need to add an ending "</script>",
|
# there is no need to add an ending "</script>",
|
||||||
# as it will be added automatically!
|
# as it will be added automatically!
|
||||||
|
Loading…
Reference in New Issue
Block a user