Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change cursor in google maps v3 in runtime

The draggableCursor option can be set in google.maps.Map object upon creation. Is there any way how one could set this option in runtime? Or is there any other clean way how to change the cursor in runtime? I've searched through the documentation but there's nothing like setDraggableCursor method...

like image 281
Tomas Avatar asked Mar 15 '26 14:03

Tomas


1 Answers

The option can be set at runtime. You have to set the map options with map.setOptions() function. Set only the desired property in the options object:

map.setOptions({draggableCursor: myNewDraggableCursor});
like image 146
Tomik Avatar answered Mar 19 '26 00:03

Tomik