Finally have all pieces working once again...

svn: r17987
This commit is contained in:
Rob G. Healey
2011-08-02 09:10:49 +00:00
parent 13446491b2
commit e6a22dd95c
3 changed files with 131 additions and 105 deletions

View File

@@ -147,33 +147,29 @@ openstreet_jsc = """
# NarrativeWeb javascript code for PlacePage's "Google Maps"...
google_jsc = """
var myLatlng = new google.maps.LatLng(%s, %s);
var marker;
var map;
var myLatlng = new google.maps.LatLng(%s, %s);
function initialize() {
var mapOptions = {
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: myLatlng
};
map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
function initialize() {
var mapOptions = {
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: myLatlng
};
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
marker = new google.maps.Marker({
map: map,
draggable: true,
animation: google.maps.Animation.DROP,
position: myLatlng
});
var marker = new google.maps.Marker({
map: map,
draggable: true,
animation: google.maps.Animation.DROP,
position: myLatlng
});
google.maps.event.addListener(marker, 'click', toggleBounce);
}
google.maps.event.addListener(marker, 'click', toggleBounce);
function toggleBounce() {
if (marker.getAnimation() != null) {
marker.setAnimation(null);
} else {
marker.setAnimation(google.maps.Animation.BOUNCE);
}
function toggleBounce() {
if (marker.getAnimation() != null) {
marker.setAnimation(null);
} else {
marker.setAnimation(google.maps.Animation.BOUNCE);
}
}"""
}"""