Error while trying to display data (GeoJSON) - Openlayers 3.0

المشرف العام

Administrator
طاقم الإدارة
I am trying to create a new layer out of GeoJSON data for my Openlayers map.The format of the GeoJSON is RD (EPSG:28992). An example coordinate of a polygon:

[ 82396.01099999994, 453708.52899999917, 0 ]I am trying to convert the data with the following code:

var locatusSource = new ol.format.GeoJSON().readFeatures(locatus, { dataProjection: 'EPSG:28992', featureProjection: 'EPSG:3857'});//Create vectorvar locatusObject = new ol.layer.Vector ({ source: locatusSource, style: new ol.style.Style({ stroke: new ol.style.Stroke({ color: 'blue', lineDash: [4], width: 3 }), fill: new ol.style.Fill({ color: 'rgba(0, 0, 255, 1)' }) })});But after I am trying to create the map I get the following error:

Uncaught TypeError: Cannot read property 'b' of undefined ol.js:68

Uncaught TypeError: Cannot read property 'closure_uid_380901594' of undefined ol.js:17

What am I doing wrong?



أكثر...
 
أعلى