开发者

How do I toggle 'draggable' for Google Maps GMarker object?

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 ou开发者_StackOverflow中文版t how to make it undraggable.


like this

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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜