Developer forum

Forum » Templates » Maps module - multiple locations on same address

Maps module - multiple locations on same address

Mikkel Toustrup Olsen
Reply

Hello all,

I am using the maps module to show different locations on my map and I am also using the cluster settings in order for the user to see clustered locations when zoomed out.

However I have multiple companies on the same location - therefore same geolocation... The cluster shows them correctly (x amount in the same area) , however I am not able to see the different addresses in their seperate infowindows - it only shows one.. (the first one I reckon) and then nothing else happens.. which means I am not able to see the rest of the locations which isn't that user friendly nor my goal.

I couldnt see any dynamicweb setting to accomplish the above mentioned "split" so I googled a bit.

I then came across https://github.com/jawj/OverlappingMarkerSpiderfier and implemented this on a custom page template which worked brilliantly..

Though, my issue is. I simply cannot find the right way to implement the functionality in the default maps.js file..

Anyone out there made a workaround on this?..  

Thanks!

 

/MikkelTO

 


Replies

 
Mikkel Ricky
Reply
This post has been marked as an answer

I've created a version of Maps.js with support for OverlappingMarkerSpiderfier: https://dl.dropboxusercontent.com/u/77245248/dynamicweb/maps/Maps-OverlappingMarkerSpiderfier.js

Use this in place of the default Maps.js and include OverlappingMarkerSpiderfier in your maps template:

<script src='http://jawj.github.io/OverlappingMarkerSpiderfier/bin/oms.min.js'></script>

<div class='dynamicweb-map' id='@GetValue("ElementID")' data-list-position='@GetValue("ListPosition")'>
  …
</div>

Some additional tweaking may be necessary, but it's a good starting point.

Best regards,
Mikkel

Votes for this answer: 1
 
Mikkel Toustrup Olsen
Reply

Cheers Mikkel,

I did some custom implementation and got it to work - however the above mentioned is awesome for future usage!

Best Regards,

MikkelTO

 

 

 

You must be logged in to post in the forum