From dab6567aec0816bd08428705c737ac6fddd588b7 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Mon, 20 Apr 2015 21:03:44 +0200 Subject: [PATCH] Make sure vector-esri-edit example works hosted --- examples/vector-esri-edit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/vector-esri-edit.js b/examples/vector-esri-edit.js index 234b8d056d..1647246fc9 100644 --- a/examples/vector-esri-edit.js +++ b/examples/vector-esri-edit.js @@ -90,7 +90,7 @@ selected.on('remove', function(evt) { var fid = feature.getId(); if (dirty[fid] === true) { var payload = '[' + esrijsonFormat.writeFeature(feature, { - featureProjection: select.getMap().getView().getProjection() + featureProjection: map.getView().getProjection() }) + ']'; var url = serviceUrl + layer + '/updateFeatures'; $.post(url, { f: 'json', features: payload }).done(function(data) { @@ -110,7 +110,7 @@ selected.on('remove', function(evt) { draw.on('drawend', function(evt) { var feature = evt.feature; var payload = '[' + esrijsonFormat.writeFeature(feature, { - featureProjection: evt.target.getMap().getView().getProjection() + featureProjection: map.getView().getProjection() }) + ']'; var url = serviceUrl + layer + '/addFeatures'; $.post(url, { f: 'json', features: payload }).done(function(data) {