views:

11

answers:

1

I want to have draggable markers (already done), but I need to be able to turn off draggability in certain conditions.

Marker is created like this;

var Marker = new GMarker(center,{draggable:true});  

...which works fine. But I can't figure out how to make it undraggable.

+1  A: 

like this

var myMarker = new GMarker(center,{draggable:true}); 
myMarker.disableDragging();

http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMarker.disableDragging

Jonathan
That's it. Damn that was fast. Was searching for the wrong thing in API. Beautiful, thank you!
Jules