Make sure vector-esri-edit example works hosted

This commit is contained in:
Bart van den Eijnden
2015-04-20 21:03:44 +02:00
parent 8ddf162279
commit dab6567aec

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