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 !!!

2 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

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=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">