AnsweredAssumed Answered

Delete operation doesn't work for EDIT_VERTICES

Question asked by guri.ghuman@gpsit.co.nz_gpsit on Dec 3, 2019
Latest reply on Dec 3, 2019 by guri.ghuman@gpsit.co.nz_gpsit

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 { editMapsetGeometries } = this.props;
    const { editToolBaresriContentmapObj } = 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([255690]),
            2
          ),
          new esriContent.Color([25525500.25])
        );
        let boundaryGraphic = new esriContent.Graphic(
          evt.graphic.geometry,
          symbol
        );
        const options = {
          allowDeleteVertices: true
        };

        // Activate Edit Toolbar
        toolbar.activate(esriContent.Edit.EDIT_VERTICESevt.graphic, options);
        setGeometries(evt.graphic.geometry);
      }
    }
  };

Outcomes