On Tuesday, September 14, 2010, Pol <[email protected]> wrote: > I also tried this: > MarkersStore = new GeoExt.data.FeatureStore({ > layer: MarkersLayer, > proxy: new GeoExt.data.ProtocolProxy({ > protocol: new OpenLayers.Protocol.HTTP({ > url: marker_api_url, > format: new OpenLayers.Format.GeoJSON({ > read: function() { > var obj = > OpenLayers.Format.JSON.read.apply(this, arguments); > console.log(obj); > return > OpenLayers.Format.GeoJSON.read.apply(this, [obj]); > }, > 'internalProjection': proj900913, > 'externalProjection': proj4326 > }), > readWithPOST: true > }) > }), > autoLoad: false, > }); > > But it doesn't works. I never get anything in the log. > Can you show me an example ?
You should do return OpenLayers.Format.GeoJSON.read.apply(this, [obj["#data"]]); But you have another problem since console.log doesn't display anything. What if you add a console.log at the beginning of the read function? -- 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://www.geoext.org/cgi-bin/mailman/listinfo/users
