Select to view content in your preferred language

Labeling nodes from Polyline when mouse hovers over node (.NET)

1048
3
09-03-2020 09:22 AM
DanSepeda
Emerging Contributor

Hello,

I was wondering if it is possible to label nodes (each with a distinct string labels e.g. A1, A2, A3, ... ) from a polyline and to only visually see the labels when a mouse hovers over a node? I'm working in C# .Net and was wondering if ArcGIS SDK supports this? Not sure if I have to override a built in class within the framework. Please, see the diagram below to get a visual representation of exactly what I would like to accomplish. Thank you guys!!

0 Kudos
3 Replies
JoeHershman
MVP Regular Contributor

As far as I am aware there is no hover interaction, the user would need to click on the node to display anything

Thanks,
-Joe
0 Kudos
DanSepeda
Emerging Contributor

But could I still associate a string label with the node when clicked?

0 Kudos
JoeHershman
MVP Regular Contributor

What you could do, is use the MouseMove event on the MapView so when the mouse is within a certain distance of the node it does the display.  Could put a timer in there to be sure the mouse is not just moving across the point, but is being held there

For display, you could have a graphic be displayed which would have a label appearance.  When the mouse moves away the graphic gets removed.

Thanks,
-Joe
0 Kudos