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