4

I'm using the clustering feature in Google Maps for EE version 3.0.190 to plot people on a map, but have a problem as some people have the exact same coordinates as they're based at the same address.

I'm finding that the clustering marker shows this as 2 points, but as I keep zooming in, they never split. Until eventually, at the very last zoom level, the marker disappears completely.

Is there a way to work around this at all?

Here's the code I'm using:

{exp:gmap:init id="map1" class="gmap" scrollwheel="false" style="width:930px;height:700px" clusterStyles="{url: '/assets/images/cluster-icon-blue.png', textColor: '#fff', textSize: '12', height: 52, width: 53, anchor: [0, 0]}" overviewMapControl="true" overviewMapControlOptions="{opened:true}" zoom="6" center="Silecroft"}

{exp:channel:entries channel="people" status="open" disable="categories|category_fields|member_data|pagination" limit="1000" dynamic="no" sort="asc"}
  {cf_people_geo_location id="map1" show_one_window="true" icon="/assets/images/map-icon-white.png" infobox="true" offsetY="0" offsetX="15" closeBoxMargin="5px" class="ui-infobox-dark" closeBoxURL="/themes/third_party/gmap/css/images/white-close-button.png" style="width: '250px'" clearanceX="10" show_one_window="true" clustering="true" extend_bounds="false"}
    <h3><a href="/people/{url_title}/" title="View {title}">{title} &raquo;</a></h3>
  {/cf_people_geo_location}
{/exp:channel:entries}
2

Currently this is the default behavior of MarkerCluster v3. Using the duplicate_makers="false" should work, but you tested it and said it did now, but even if it did, it's not the desired functionality anyway.

Currently the only way to work around this would be to write some of your own JavaScript to slightly offset each duplicate location. Given that the core add-on uses procedural JS to plot markers, it would be difficult without completely rewriting your own methods (which I have done).

I even wrote some custom JS to make the infowindow content different it has more than 1 entry in the same location. This is always a possibility, but again, requires writing your own JS.

I will definitely keep this in mind for a future release.

|improve this answer|||||
  • Thanks Justin. Sounds like this has turned into a feature request, though given I can just edit my clashing markers manually so they're very close but not quite identical, I guess it's a low priority feature request. Certainly something that would be nice to happen automatically one day though. – Stephen Nov 28 '12 at 0:08
  • Hi Justin - just a quick update on this. Although we're manually editing points to try and avoid the issue, it does keep happening time and time again and keeps requiring manual intervention to workaround. Given that it keeps happening in normal use and we're not doing anything crazy/custom here, I'd be inclined to call this issue a bug now, rather than a feature request. I'm sure it doesn't make any difference to you what I classify it as of course, but just saying. :-) – Stephen Feb 13 '13 at 13:18
  • Just one more comment - I've just noticed that this issue doesn't just affect markers with identical coordinates, but it also affects markers that are very close together. When clustering is enabled, the the cluster never separates. When clustering is not enabled, only one of x amount of points is shown. – Stephen Feb 14 '13 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.