mardi 3 mars 2015

Cluster multiple feature server


I want to cluster different servers at a time, what I mean is this I have this feature servers: server1=http://ift.tt/1BBGrlJ


server2=http://ift.tt/1DC3bPc


When using L.esri.clusteredFeatureLayer('server1', { radius: 120000000000, useCORS:0, })addTo(map); for both of them they are clustered separately. I have tried using something like



L.esri.Layers.featureLayer('http://server1/0').on('ready', function(e) {
// The clusterGroup gets each marker in the group added to it
// once loaded, and then is added to the map
var clusterGroup = new L.MarkerClusterGroup();
eachLayer(function(layer) {
clusterGroup.addLayer(layer);
});


});


to add markers to a clustergroup and then add the markers from server2, but cant get it working any help?





Aucun commentaire:

Enregistrer un commentaire