changing cursor back to default

1,541 views
Skip to first unread message

Andrew

unread,
Dec 21, 2011, 4:01:27 PM12/21/11
to google-map...@googlegroups.com
Hi the default cursor when my page opens is the open hand. When I click on my "Measure Distance" button I change the cursor to crosshairs. Once I have drawn a polyline with 2 vertices I remove the listener and want to go back to the open hand cursor. However I've tried all the types and none of them show the open hand. The closest I get to that is the 'pointer' which displays a hand and index finger pointed. Thanks!

map.setOptions({ draggableCursor: 'pointer' });
I have tried 'auto', 'default', 'hand' (that didn't work though),' text', 'wait', etc.

Chad Killingsworth

unread,
Dec 21, 2011, 5:06:46 PM12/21/11
to google-map...@googlegroups.com
The maps API uses a custom cursor. Currently it is:

Andrew

unread,
Jan 3, 2012, 12:17:37 PM1/3/12
to google-map...@googlegroups.com
Thanks!

map.setOptions({ draggableCursor: 'url(http://maps.gstatic.com/mapfiles/openhand_8_8.cur), crosshair'});

sb

unread,
Jan 3, 2012, 12:44:23 PM1/3/12
to Google Maps JavaScript API v3
You may want to set the hotspot on your cursor back to how it was.

map.setOptions({draggableCursor:'url(http://maps.gstatic.com/mapfiles/
openhand_8_8.cur) 8 8, default '});

http://www.shanebest.com/api3/cursorexample.html

This sets the area of the cursor, otherwise you might run into
Reply all
Reply to author
Forward
0 new messages