Select to view content in your preferred language

GeometryEditor FeedbackLine access

108
6
yesterday
DmitriyKolokolnikov
Emerging Contributor

Can I access the FeedbackLine when dragging a node in the GeometryEditor to display, for example, the current polyline length during the drag? Thanks

0 Kudos
6 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

I think link to another thread could be helpful for you:

Solved: Add GeometryChanged event to the new GeometryEdito... - Esri Community

0 Kudos
DmitriyKolokolnikov
Emerging Contributor

Thank you for the quick response. Unfortunately, this is not quite what I need. I need to obtain the geometry during the process of dragging a vertex. It seems that currently it’s only possible to get the geometry at the end of the dragging, i.e., after releasing the mouse.

0 Kudos
GKmieliauskas
Esri Regular Contributor

Have you read blog about migrating from SketchEditor -> GeometryEditor inside the thread I mentioned above. Look at the part "Asynchronous start task with geometry result"

0 Kudos
DmitriyKolokolnikov
Emerging Contributor

Yes, I have read that. I can get the geometry, but only after the node dragging is complete. However, I need to get it during the dragging.

0 Kudos
GKmieliauskas
Esri Regular Contributor

If you need to get it during dragging you need to listen for PropertyChanged event as in sample from thread:

mapView.GeometryEditor.PropertyChanged += (s, e) =>
{
    if (e.PropertyName == nameof(mapView.GeometryEditor.Geometry))
    {
        // Geometry has changed
    }
};
0 Kudos
DmitriyKolokolnikov
Emerging Contributor

The PropertyChanged for the GeometryEditor.Geometry property is triggered only after the vertex dragging is completed, i.e., after the mouse button is released.

0 Kudos