<br><br>On Friday, March 2, 2012, Scott Chapman <<a href="mailto:scott@mischko.com">scott@mischko.com</a>> wrote:<br>> Here's my current code. "A" works. "B" doesn't.<br>> Is there something else I need to add to make the features actually show up?<br>
><br>> //A:<br>> var vector_layer = new OpenLayers.Layer.Vector("Stores");<br>> map.addLayer(vector_layer);<br>><br>> OpenLayers.Request.GET({<br>> url: "/kiosks_status_geoJSON/",<br>
> headers: {'Accept':'application/json'},<br>> success: function (req)<br>> {<br>> var g = new OpenLayers.Format.GeoJSON();<br>
> var feature_collection = g.read(req.responseText);<br>> //console.log(feature_collection);<br>> vector_layer.destroyFeatures();<br>> vector_layer.addFeatures(feature_collection);<br>
> }<br>> });<br>> //vs:<br>><br>> //B:<br>> var vector_layer = new OpenLayers.Layer.Vector("Stores", {<br>> strategies: [new OpenLayers.Strategy.Cluster(), new<br>
> OpenLayers.Strategy.Fixed()],<br>> protocol: new OpenLayers.Protocol.HTTP({<br>> url: "/kiosks_status_geoJSON/",<br>> headers: {'Accept':'application/json'},<br>
> format: new OpenLayers.Format.GeoJSON()<br>> })<br>> });<br>> map.addLayer(vector_layer);<br><br>What if you remove the cluster strategy?<br><br>-- <br>Eric Lemoine<br>
<br>Camptocamp France SAS<br>Savoie Technolac, BP 352<br>73377 Le Bourget du Lac, Cedex<br><br>Tel : 00 33 4 79 44 44 96<br>Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br><a href="http://www.camptocamp.com">http://www.camptocamp.com</a><br>
<br>