> www.newlaunches.co.uk/Walks/newwalk1.php
You declare a global variable called 'map' ...
var map;
but it doesn't get used ...
> function mapLoad() {
> if (GBrowserIsCompatible()) {
> var map = new GMap2(document.getElementById("map"));
> var marker = new GMarker(center, {draggable: true});
This creates a marker (in local scope to mapLoad) that never gets
addOverlayed later.
> GEvent.addListener(map, "click", function(overlay, point) {
> map.addOverlay(new GMarker(point, {draggable: true}));
This creates a brand new draggable marker
> GEvent.addListener(marker, "dragend", function() {
This adds a listener to the 'marker' in local scope that never gets
put on the map, so it could never get called.
You probably want to include the setting up of this listener within
the code that creates the draggable marker and attach it to that
marker.
cheers, Ross K
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---