We would like the ability to see the line when connecting two vertices of a polygon (before creating the new vertex). Our old application using 10.2.7 seems to have this functionality but I can't find it using 100.1 does not. I have searched everywhere without any luck.
Is there a way to activate this functionality in the MapView or in the SketchEditor?
In v100.3, SketchEditor was enhanced to show draw feedback, which allows you to see how the geometry will look like before the vertex is committed/inserted as you interactively drag it. Is this what you're looking for?
The symbols to update if you don't like this default symbology is FeedbackFill/Line/VertexSymbol in SketchEditor.Style.
Unfortunately, not exactly what I was looking for. Let me clarify. I am looking for something similar to this but I mean while drawing the polygon, not editing it. So let's say that I selected the first vertex, vertex 0, I would like to see a line while I am looking where to place the second vertex, vertex 1. Does that make sense?
I see. You can programmatically call insert or move vertex. Moving the selected vertex during MouseMove, ManipulationDelta, TouchMove, or any event you see fit, should show the connecting line between last committed vertex to where you're moving cursor/touch point to. Something like this, but you have to find the right condition that works for you to differentiate between insert/move.
int vertexCount = 0;
MyMapView.MouseMove += (s, e) =>
if (!MyMapView.SketchEditor.IsEnabled || MyMapView.SketchEditor.Geometry == null)
var location = MyMapView.ScreenToLocation(e.GetPosition(MyMapView));
if ((MyMapView.SketchEditor.Geometry as Polygon)?.Parts?.FirstOrDefault()?.PointCount <= vertexCount)
MyMapView.GeoViewTapped += (s, e) =>
I am now getting this issue Completing the SketchEditor with a double click sometimes causes the application to crash
I am using the solution above along with attaching to the GeoViewDoubleTapped event to handle completing the draw action.
I found that the GeoViewTapped event fires before GeoViewDoubleTapped (obviously). The issue that I am seeing is that InsertVertexAfterSelectedVertex is executed fine, then when the GeoViewDoubleTapped is fired it completes the sketch. Something with the runtime is taking so long to complete the InsertVertexAfterSelectedVertex method call that the sketch actually completes before the vertex is added. Which causes the error that is noted in the link above
Is that if adding a vertex is asynchronous? If it is, then we need the ability to await that method.