How to Get Rid of the Hand Cursor on Google Maps API V3
You can customize the cursors that an embedded Google map uses on your website. By default, the map uses an open-handed cursor when a mouse pointer is over the map and a closed-handed cursor when the viewer of your website is dragging the map. You can set the map’s options in your Web page’s HTML code to get rid of the hand cursor and replace it with a cursor of your choice.
Instructions
-
-
1
Open your Web page’s HTML file in a text editor.
-
2
Locate the “var myOptions = {“ line in the file. This line begins the section containing your Google Maps application programming interface version 3 options.
-
-
3
Add the following code as new lines between the “var myOptions = {“ and the “};” lines:
draggableCursor: pointer,
draggingCursor: crosshair -
4
Replace the “pointer” and “crosshair” values with the names of the cursors you want to use on the map. By default, this code shows the standard mouse pointer when a user hovers over the map and a crosshair cursor when the user drags the map.
-
5
Verify that each option line in the myOptions section ends with a comma, except for the last line. Your myOptions section should look similar to the following example:
var myOptions = {
zoom: 100,
center: value,
mapTypeId: google.maps.MapTypeId.HYBRID,
draggableCursor: pointer,
draggingCursor: crosshair
}; -
6
Save your Web page’s HTML file and upload it to your Web server.
-
1
Tips & Warnings
You can specify any standard cursor. For example, “text” shows the text entry cursor.