I am following this tutorial and I can't display the GeoJSON file mentionned 7day-M2.5.json. I copied and pasted the same code ; there is no error message in debug tools.
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
title: 'Global Imagery',
source: new ol.source.TileWMS({
url: 'http://demo.opengeo.org/geoserver/wms',
params: {LAYERS: 'nasa:bluemarble', VERSION: '1.1.1'}
})
}),
new ol.layer.Vector({
title: 'Earthquakes',
source: new ol.source.Vector({
url: '/exercices/data/7day-M2.5.json',
format: new ol.format.GeoJSON()
}),
style: new ol.style.Style({
image: new ol.style.Circle({
radius: 3,
fill: new ol.style.Fill({color: 'white'})
})
})
})
],
The problem seems to be the json file because of "this" : in ol.js window, "this" is the reference to the GeoJSON. I can't go further, no idea.