[OpenLayers-Dev] Cross-domain problem with a external vector layer in format GeoJSON or GeoJSONP
Miguel-Angel Manso-Callejo (UPM)
m.manso at upm.es
Wed Nov 7 06:27:38 PST 2012
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
More information about the Dev
mailing list