Announcement

Collapse
No announcement yet.

Highlight event or other way to show label on hover / highlight

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Highlight event or other way to show label on hover / highlight

    I have eyeDistanceScalingLabelThreshold set pretty low on my placemarks so labels only show when zoomed in. When the user is zoomed out though, I want them to highlight / hover the placemark and see the label.

    Any idea how to achieve this? I thought I could alter the eyeDistanceScalingLabelThreshold on a highlight event but don't see anything like that built in. And I dont see another way using the built in highlight options to force it to be shown when the eyeDistanceScalingLabelThreshold is set low.

    Thoughts?


  • #2
    You might try doing a mouse handler mouse over event with your Placemark's highlighted attributes set to include labelAttributes that show the label.

    Comment


    • #3
      Thanks for the feedback.

      I played with highlight attributes but the eyeDistanceScalingLabelThreshold still applies whether the placemark is highlighted or not. So those attributes don't matter for the label when the eye is above the placemark's eyeDistanceScalingLabelThreshold. I could also not use the highlight attributes and raise the eyeDistanceScalingLabelThreshold value since I wanted to show all the labels when under the eyeDistanceScalingLabelThreshold.

      In the end I got my desired effect working by using a mouse move listener that sets the newly highlighted placemark's eyeDistanceScalingLabelThreshold to a high value so it shows at any eye height. Using a short timer I set the eyeDistanceScalingLabelThreshold value back to the original, lower value.

      Creates a nice effect of showing the label as you hover past a placemark and then fades away.

      Would be nice if the api allowed the eyeDistanceScalingLabelThreshold to be set for the placemark attribute and set to a different value for the highlight attribute.

      Cheers

      Comment

      Working...
      X