Select to view content in your preferred language

GeometryEditor FeedbackLine access

407
8
Jump to solution
09-27-2024 12:43 AM
Labels (3)
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
1 Solution

Accepted Solutions
HamishDuff
Esri Contributor

Hi @DmitriyKolokolnikov,

Thank you for your question. Currently you cannot access the FeedbackLine length during a drag action, as you've mentioned it is only possible to retrieve the length after a subsequent vertex has been placed. 

I'll make a note of this as a potential enhancement. 

View solution in original post

0 Kudos
8 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
HamishDuff
Esri Contributor

Hi @DmitriyKolokolnikov,

Thank you for your question. Currently you cannot access the FeedbackLine length during a drag action, as you've mentioned it is only possible to retrieve the length after a subsequent vertex has been placed. 

I'll make a note of this as a potential enhancement. 

0 Kudos
Mike_Quetel
Frequent Contributor

I'd like to register support for this as an enhancement. It sounds like OP and I have similar use cases where we would like to provide continuous feedback (length, area, etc.) about the interim geometry before a vertex is actually placed by the user.

0 Kudos