function init_wrmap(i, jq_map) {
- /*
// define constants
- var EPSG4326 = new OpenLayers.Projection("EPSG:4326"); // lon/lat
- var EPSG3857 = new OpenLayers.Projection("EPSG:3857"); // google
+ var EPSG4326 = ol.proj.get("EPSG:4326"); // lon/lat
+ var EPSG3857 = ol.proj.get("EPSG:3857"); // google
+ /*
// tool functions
function createElement(tagName, attributes) {
var element = $(document.createElement(tagName));
jq_map.empty(); // once parsed, remove geojson string from the map element.
var json_js = JSON.parse(json_string);
var format_geojson = new ol.format.GeoJSON();
- var features_all = format_geojson.readFeatures(json_js, {dataProjection: 'EPSG:4326', featureProjection: 'EPSG:3857'});
+ var features_all = format_geojson.readFeatures(json_js, {dataProjection: EPSG4326, featureProjection: EPSG3857});
// extract, tranform and split features to layers
/*