Geometry Editor - Move or Rotate

02-09-2024 01:23 PM
Labels (4)
Occasional Contributor

I'm having some issues with moving a point geometry via the GeometryEditor (v200.2).  The basic workflow is that user has selected an existing graphic and then clicks a move or rotate ToggleButton.  The button sets the appropriate tool in the editor (lifted from this sample), then calls Start() on the editor, passing in the geometry of the selected graphic, then calling SelectGeometry().

I'm getting the expected interactions for lines and polygons, but not points.  Dragging the line or polygon (or anywhere in the editor's selection rectangle) will move or rotate and I can update my graphic once the geometry property changes. 

Points do not seem to respond or have a selection rectangle in the editor.  An attempt to drag the point simply pans the map.  Would appreciate any suggestions with what I am getting wrong here.

SelectGeometry() called on editor, with Geometry property set to a polygon:


SelectGeometry() called on editor, with Geometry property set to a point:


Here is the configuration of my move tool:

            _moveGeometryTool = new VertexTool()
                Configuration = new InteractionConfiguration()
                    AllowMovingSelectedElement = true,
                    AllowMidVertexSelection = false,
                    AllowDeletingSelectedElement = false,
                    AllowPartCreation = false,
                    AllowGeometrySelection = true,
                    AllowPartSelection = true,
                    AllowScalingSelectedElement = false,
                    AllowVertexCreation = false,
                    AllowVertexSelection = false,
                    AllowRotatingSelectedElement = false,
                    RequireSelectionBeforeMove = false,
                Style = new GeometryEditorStyle
                    MidVertexSymbol = null,
                    VertexSymbol = null,
                    SelectedVertexSymbol = null,
                    SelectedMidVertexSymbol = null,
                    FeedbackVertexSymbol = null


0 Kudos
1 Reply
Esri Contributor

Hi @MikeQuetel1 thanks for your question. 

I took a look at the sample you based your implementation on and I think a can see what is missing. 

In the sample implementation tool styles are not being set when the geometry type is `MapPoint` or `Multipoint`. This causes the inactive and move tools to hide the vertex symbol and selected vertex symbol when editing a point. 

I've created a PR to correct this in the arcgis-maps-sdk-dotnet-demos repo.

The main section to look at is:

else if (geometry is MapPoint || geometry is Multipoint)
  _inactiveTool.Style.VertexSymbol = _inactiveTool.Style.SelectedVertexSymbol = _moveTool.Style.SelectedVertexSymbol = _moveTool.Style.VertexSymbol = symbol;

Please let me know if this doesn't fix your issue. 

0 Kudos