Skip to main content

OpenLayers 2 Cluster Strategy with OSM

I am digging into clustering strategies with Open Layers 2. Looking at the example OpenLayers2 Cluster Strategy Threshold, I was able to get it working. Unfortunately I am working with OSM, and the example is not working as expected by replacing the appropriate line in the code example:

 /*var base = new OpenLayers.Layer.WMS("OpenLayers WMS", 
                 "http://vmap0.tiles.osgeo.org/wms/vmap0",
                {layers: 'basic'}
            );
 */
 var base = new OpenLayers.Layers.OSM();

It results in looking at only one circle instead of many. Only when I start zooming in, more and more circles do appear. Why is it different when I am using OSM? Which settings have to be taken care of?

kword
  • 23
  • 3