Hot answers tagged

2

Your AJAX success function is creating an array of GeoJSON features. OpenLayers expects OpenLayers features. $.ajax({ url: 'geoJSON-url', dataType: 'json', async: false, success: function(json1) { features = new GeoJSON().readFeatures(json1); } }); It would be simpler to let OpenLayers asychronously load and parse the URL var ...


Only top voted, non community-wiki answers of a minimum length are eligible