[OpenLayers-Users] Re: Clustering in multiple layers

JavierMR javiersdevmail at ymail.com
Wed Aug 31 10:38:10 EDT 2011


Hi,

thanks for your replay.

Unfortunately this is not an option at this moment. The application is
already developed but it has to be modified (and not easy to change server
part since the openlayers library is encapsulated...). What i ended doing is
a creating a modified version of the OpenLayers Cluster Strategy so instead
of pasing a Layer a Strategy, i have a Strategy with multiple layers.

Basicaly instead of having a property in the Strategy for the layer that it
applies, i have an array of layers where the Strategy applies. The rest of
the methods are basicaly the same activate, deactivate and cluster. I have
also added a property wich is the layer where the clusters must be added.

It's not working smoothly yet, but apparently it works.Now the idea is
subclass this custom strategy so i can displace the features that are in the
same group or combine them into a single feature ..... or whatever.

If anyone has any suggestion or idea why this is the rigth way or why it's
not, please tell.

Best regards.

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Clustering-in-multiple-layers-tp6702087p6746804.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list