I am working with the ArcGIS JavaScript API and want to move and edit the vertices of a polyline analog to the following sample: http://help.arcgis.com/en/webapi/javascript/arcgis/demos/ed/ed_toolbar.html
This works fine as long as the polyline does not contain M Values. If it does contain M Values I get the following error in firebug.
Errorcode:-2147221399, description: „Geometry does not have M Value(s), hence cannot update the feature."
What am I doing wrong?
Here’s my code:
function initEditing(layers) {
var myMap = this;
var firePerimeterFL = myMap.getLayer("firePerimeterFL");
var editToolbar = new esri.toolbars.Edit(myMap);
dojo.connect(editToolbar, "onDeactivate", function(tool,graphic,info) {
if(info.isModified){
firePerimeterFL.applyEdits(null, [graphic], null);
}
});
var editingEnabled = false;
dojo.connect(firePerimeterFL, "onDblClick", function(evt) {
dojo.stopEvent(evt);
if (editingEnabled === false) {
editingEnabled = true;
editToolbar.activate(esri.toolbars.Edit.EDIT_VERTICES , evt.graphic);
} else {
editToolbar.deactivate();
editingEnabled = false;
}
});
}
Best Answer
Editing feature geometries with M values is not supported via REST (or SOAP for that matter) at 10.0. It is a planned feature for 10.1 (along with Z values). Here's the documentation for this: Authoring feature services
Specifically: