jawj / OverlappingMarkerSpiderfier

Deals with overlapping markers in Google Maps JS API v3, Google Earth-style
http://blog.mackerron.com
836 stars 238 forks source link

Overlay is bigger then marker #167

Open Any-More opened 4 years ago

Any-More commented 4 years ago

Hello everybody First I would like to thank you for this fantastic project. Unfortunately I have a little problem with the overlay size. No matter how big my marker image is, the overlay image is always bigger and covers the other markers is there a possibility to put the overlay picture on the same size of the marker picture? Or do I have a reasoning error? Thanks for your help

Gruss Marc 0062

paulyoung5 commented 4 years ago

hi @Any-More 👋

when you say 'overlay image', is this preventing click events on the marker underneath (or click events happening on the wrong marker)?

assuming you're using a custom marker icon, I think you're right that this space comes from img being larger than your actual marker graphic. you'll need to tweak the origin, size/scaledSize and anchor properties to remove any undesired space (see https://developers.google.com/maps/documentation/javascript/markers#complex_icons)