Merge pull request #3605 from bartvde/issue-3605

vector-esri-edit.html uses non api method
This commit is contained in:
Bart van den Eijnden
2015-04-21 08:41:37 +02:00

View File

@@ -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) {