How can I stop my google maps markers from having the pointer cursor style on hover? Currently the markers behave like links in that if you hover the mouse over them the cursor changes to a hand.
Here is the code that creates the marker:
function addMarkerLargeMap(latlng, myTitle, html, price) {
markers.push(new google.maps.Marker({
position: latlng,
map: map,
title: myTitle,
icon: "path-to-my-icon.png",
html: "<div style='width:100px;height:auto'>" + html + "</div>",
}));
Set clickable to false in the marker options
function addMarkerLargeMap(latlng, myTitle, html, price) {
markers.push(new google.maps.Marker({
position: latlng,
clickable: false,
map: map,
title: myTitle,
icon: "path-to-my-icon.png",
html: "<div style='width:100px;height:auto'>" + html + "</div>",
}));
Alternatively, you can set the cursor
property in the marker options, if you want to use a specific type of cursor instead of the default. e.g.
cursor: 'crosshair'
Although this only seems to work if the marker is clickable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With