AnimatedCluster pan related bug… fixed !!!

If you regularly follow this blog and are web mapping developer that works with OpenLayers, (too much coincidences???) probably you know about the the Animated marker cluster strategy for OpenLayers I created some time ago.

Unfortunally, the last version (v0.2) has a ugly bug. The code works fine when you change the zoom level but clusters are not updated when you pan the map.

I’m happy to say right now I have uploaded a new version (v0.3) which fixes this bug on my GitHub repository. Basically, now the code controls if the action is a zoom change or a pan movement and updates and animates the clusters accordingly. That is, if you pan the map the clusters on the current level are recomputed.

Take into account this can cause the features where clustered in different clusters, so you can see how bubbles changes its position and number of features within it.

In addition, the demo page has been updated with the new version. Check it !!!

animatedcluest

Thanks to all the great people that has sent me their experiences when using the AnimatedCluster !!!

Related Posts:

4 Responses

  1. CoDEmanX February 22, 2013 / 12:09

    Hey asantiago,
    nice work on this OpenLayers addition!
    I’d like to use it for a project, but I actually want to retrieve server-side clustered features. Now I wonder how this could be made working, maybe by prefetching the features for the next zoom step of the current area?

    One thing I noticed btw: unclustered features don’t animate, would be nice if they did :)

    • asantiago February 22, 2013 / 15:30

      Hi and thanks.
      Remember you can load remote content for a Vector layer using “Protocols” like WFS (to load WFS server features) or HTTP (to load a GeoJSON file).

      Cheers

  2. lilian July 30, 2015 / 11:06

    Hello, Nice work, we are considering to add it to the map on our website.
    Is there any chance you know if there is an equivalent of https://github.com/jawj/OverlappingMarkerSpiderfier on Openlayers ?
    Would you consider augmenting the functionalities of AnimatedCluster with the “Spidifier” function ?

    Many thanks for all your work. rgds

    • asantiago July 31, 2015 / 10:49

      Hi Lilian,
      I don’t know any equivalence on OL, neither OL2 nor OL3.
      From my experience I can say it is hard to implement little nice things that this in OL.

      For Leaflet library I now the markercluster plugin (https://github.com/Leaflet/Leaflet.markercluster) which is great.

      Cheers.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">