Robert Scheitlin, GISPâ
Hi all,
when I try to Edit Vertices, I am able to Add and Move vertex but can't Delete.
right clicking vertex on map takes the screen to bottom of the page.
can't figure put why Add/Move works and Delete doesn't?
calling editGeometry()
map.getLayer("baseGrahic").on("click", evt => {
this.editGeometry(evt);
});
UPDATE: also added options but still the same issue
editGeometry()
editGeometry = evt => {
const { editMap, setGeometries } = this.props;
const { editToolBar, esriContent, mapObj } = this.state;
if (editMap === true) {
let toolbar = null;
if (editToolBar === null) {
toolbar = new esriContent.Edit(mapObj);
this.setState({
editToolBar: toolbar
});
} else {
toolbar = editToolBar;
}
if (!toolbar.getCurrentState().graphic) {
const symbol = new esriContent.SimpleFillSymbol(
esriContent.SimpleFillSymbol.STYLE_SOLID,
new esriContent.SimpleLineSymbol(
esriContent.SimpleLineSymbol.STYLE_SOLID,
new esriContent.Color([255, 69, 0]),
2
),
new esriContent.Color([255, 255, 0, 0.25])
);
let boundaryGraphic = new esriContent.Graphic(
evt.graphic.geometry,
symbol
);
const options = {
allowDeleteVertices: true
};
// Activate Edit Toolbar
toolbar.activate(esriContent.Edit.EDIT_VERTICES, evt.graphic, options);
setGeometries(evt.graphic.geometry);
}
}
};