javascript - Google maps api-3: Change polygon's default cursor -
i can change map's draggablecursor example if change polygon's cursor still pointer since map behind polygons. set polygon's cursor 'move' clear polygon draggable.
what proper way change polygon's cursor? there property or method it? (ive read google's documentation didnt find anything)
ps. have reason use polygon on polyline polyline not option.
actually seems possible. here idea.
css:
.moving, .moving * {cursor: move !important;}
js:
google.maps.event.addlistener(mypolygon, 'mousemove', function(e) { if (!isnan(e.edge) || !isnan(e.vertex)) mapcanvas.classname = ''; else mapcanvas.classname = 'moving'; } ); google.maps.event.addlistener(mypolygon, 'mouseout', function() { mapcanvas.classname = ''; } );
cheers!
Comments
Post a Comment