atmist/snazzy-info-window

I have issue regarding more than one user have same lat and long

Risheekesh opened this issue · 3 comments

Hi Team,
I have found an issue regarding the same lat and long for more than one user.
how we can display them on a map.currently, they override each other

Hi,

Thanks for trying out our plugin! As long as you are using two separate marker and info window instances, they should technically be separate on the map. I think the problem is more in terms of positioning them in a way that both are clickable, which is outside the scope of this plugin as we only deal with the popup.

Two plugins that have already solved this with the Google Maps API are: js-marker-clusterer and OverlappingMarkerSpiderfier.

Clustering (demo) is useful if you have multiple markers in approximately the same location and only need to zoom in to separate them. Spiderfying (demo) can be useful if you have multiple markers at the exact same location.

We haven't tried using these two plugins with Snazzy Info Window yet. js-marker-clusterer looks like it should work fine however OverlappingMarkerSpiderfier looks like it might have some issues as it attaches using a custom click event.

If you get either of these solutions working on your end could you let us know? We will try a few examples on our side shortly as well. We'd like to support these other plugins if possible since they come up quite often when working with the Google Maps API.

Hopefully that helps point you in the right direction. Let us know if you have any other questions. I'll keep this issue open for now until we know if Snazzy Info Window can work with these other plugins or not.

Thanks!

I've tried out both plugins I mentioned above with Snazzy Info Window and they seem to work great. You can see the basic demos on Codepen here:

These two plugins should solve most of your marker positioning issues and they work great with Snazzy Info Window. I'm going to close this issue but let us know if you have any other questions.