Edit Points Not working

962
2
Jump to solution
02-04-2018 12:55 AM
AlvinNguyen
New Contributor

Hello Everyone, 

I am trying to learn how to use the edit toolbar, but it seems like editing points does not work, even with the sample on Arcgis Javascript sample code.  

ArcGIS API for JavaScript Sandbox 

Double clicking on any other graphic will select it, but not for the point graphics.  The console shows an error: 

Uncaught Error: [esri.toolbars.Edit::activate] Unable to activate the tool. Check if the tool is valid for the given geometry type.

I cannot use the Editor Widget because I need it to work for multi points also. How can I change the sample code to fix this?  Thank you for your time.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Alvin,

   A point does snot have not have more multiple vertices to edit so you need to use the MOVE constant also:

editToolbar.activate(Edit.EDIT_VERTICES|Edit.MOVE, evt.graphic);

This will now allow for moving points or editing poly vertices.

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Alvin,

   A point does snot have not have more multiple vertices to edit so you need to use the MOVE constant also:

editToolbar.activate(Edit.EDIT_VERTICES|Edit.MOVE, evt.graphic);

This will now allow for moving points or editing poly vertices.

AlvinNguyen
New Contributor

Robert, 

Thank you for your help.

0 Kudos