So do i need to add:

GEvent.addListener(marker, "dragend", function() {
  alert("Run update script");
  });

to this:


GEvent.addListener(map, "click", function(overlay, point) {
        map.addOverlay(new GMarker(point, {draggable: true}));
        // document.getElementById("Hotel_geoLocation").value=point.y+",
"+point.x;
        var geoposition = point.y + "," + point.x;
        ajaxpack.getAjaxRequest('pushWalkPoint.php',"geo=" + geoposition +
"&wID=624763487",processGetPost,'txt');

        });


im not sure how to do that :-/

any tips for a noob?

thanks

Lee



On Jul 8, 10:29 pm, Rossko <[email protected]> wrote:
> >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
-~----------~----~----~----~------~----~------~--~---

Reply via email to