When I drag and drop a marker it raises a little bit and a skewed X appears underneath it to denote dragging position.
Is there anyway to get rid of this completely? I have custom markers and would like to display their dragging state in a different way.
You can set the property of the marker raiseOnDrag to false
var marker = new google.maps.Marker({
draggable: true,
map: map,
raiseOnDrag: false
});
And then you could use ScottE solution to create a custom drag effect.
raiseOnDrag
is undocumented in the current API version (3.17). Instead there is a crossOnDrag
property:
crossOnDrag
: boolean - If false, disables cross that appears beneath the marker when dragging. This option is true by default.
https://developers.google.com/maps/documentation/javascript/reference#MarkerOptions
Edit (Sep. 2016): raiseOnDrag
is still undocumented in 3.25
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