Hi, this question would be better suited for the openlayers-users list. If your layer is available in GeoJSONP format, you will want to use OpenLayers.Strategy.Script instead of OpenLayers.Strategy.Fixed. See http://openlayers.org/dev/examples/cross-origin.html for an example.
Andreas. On Wed, Nov 7, 2012 at 3:27 PM, Miguel-Angel Manso-Callejo (UPM) <m.ma...@upm.es> wrote: > Dear all, > > I'm trying to add a dinamic layer of earthquakes over a tiled WMS layer. > Feeds of earthquakes are provided by USGS > (http://earthquake.usgs.gov/earthquakes/feed/) in different formats included > GeoJSON and GeoJSONP. > > I have included next Jscript to add the vector layer > > var vector_layer = new OpenLayers.Layer.Vector("GeoJSON", { > projection: "EPSG:4326", > strategies: [new OpenLayers.Strategy.Fixed()], > protocol: new OpenLayers.Protocol.HTTP({ > url: > "http://earthquake.usgs.gov/earthquakes/feed/geojson/2.5/day", > format: new OpenLayers.Format.GeoJSON({ ignoreExtraDims: > true }) > }) > }); > map.addLayer(vector_layer); > > But none of the browsers (IE, FireFox or Chrome) shows the points of the > earthquakes. > > Can any one help me, please? > > Best regards, > Miguel A. Manso > _______________________________________________ > Dev mailing list > d...@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-dev -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Dev mailing list d...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-dev