From: Philipp Spitzer Date: Thu, 24 May 2018 21:17:35 +0000 (+0200) Subject: Parsing GeoJSON works now. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/mediawiki_extensions/wrmap.git/commitdiff_plain/89c5dceb8d4cd804746fe4c1df30780ed8e98eb1 Parsing GeoJSON works now. --- diff --git a/wrmap.js b/wrmap.js index a3a707b..5ccc788 100644 --- a/wrmap.js +++ b/wrmap.js @@ -47,8 +47,8 @@ function init_wrmap(i, jq_map) { var json_string = jq_map.children().last().text(); jq_map.empty(); // once parsed, remove geojson string from the map element. var json_js = JSON.parse(json_string); - // var format_geojson = new OpenLayers.Format.GeoJSON(); - // var features_all = format_geojson.read(json_js); + var format_geojson = new ol.format.GeoJSON(); + var features_all = format_geojson.readFeatures(json_js); // extract, tranform and split features to layers /*