I am working on a map based application using ArcGIS java SDK 100.7.0. I'm working on drawing and editing graphics. My question is very simple. Is there a way that we can change the center point of the extent of a polygon or a polyline graphic. I am required to give my user the ability to drag and move a graphic on MapView when on edit mode. How can i achieve this in java.
Solved! Go to Solution.
if (!graphicsOverlay.getSelectedGraphics().isEmpty()) { graphic = graphicsOverlay.getSelectedGraphics().get(0); sketchEditor.start(graphic.getGeometry()); }
if (!graphicsOverlay.getSelectedGraphics().isEmpty()) { graphic = graphicsOverlay.getSelectedGraphics().get(0); sketchEditor.start(graphic.getGeometry()); }
Thank you for your response. I have seen the usage of SketchEditor. Though my question was to know specifically that if there is any way to programmatically change the position of a polygon/polyline by shifting it from it's geometry, however your response confirms that there isn't any way to do that apart from the SketchEditor, which is why i'm going to accept this as the correct answer. The problem i am facing is that right now, my application gives the user the ability to draw different shapes (including Square, Rectangle and circles which are not currently supported by the SDK but are drawn using polygon geometry programmatically by me). In order to edit those unsupported shapes, the SketchEditor must support them too. I'm trying to avoid editing shapes using the SketchEditor due to this rigid scenario. Starting the SketchEditor with a circle polygon may probably ruin the shape. Can i even ask you when is the team going to add support for more shape geometries plus SketchEditor just like the Team has done with C# SDK.
Thank you for your feedback on the SketchEditor functionality: as you say, these shapes are currently missing from SketchEditor in the Java SDK. We are however considering them for a future release.
Kind regards,
Rachael