On Dec 9, 4:29 pm, "[email protected]" <[email protected]>
wrote:
> On Dec 9, 3:51 pm, Keith Brown <[email protected]> wrote:
>
> > Tried marker.setDraggable(true) and doesn't work. Firebug console says
> > marker is not defined?
>
> I don't see marker defined in the global scope.  I see lots of
> "marker" variables local to various (other) functions, but not that
> would be defined in this click listener
>
>        google.maps.event.addDomListener(moveTreeOuter, 'click',
> function() {
>                         marker.setDraggable(true)});
>
> How are you expecting it to know which tree to move? (what the value
> of "marker" should be?)

One suggestion:
0. create a global variable "activeMarker"
1. add to the marker click listener: activeMarker = marker
2. change the "move tree" click listener function to
activeMarker.setDraggable(true);

Then if the user clicks on a marker, the infowindow opens.  They can
click on "move tree" and drag it.

 -- Larry

>
>
>
>
> > Moved the example 
> > here:http://www.austintreeexperts.com/AJAXmap.php?f=http%3a%2f%2fwww.austi...-
> >  Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to