Select to view content in your preferred language

Map Tips and Layer Visibilty

733
4
07-12-2010 06:47 AM
RobertMEIER
Regular Contributor
I was wondering if anyone has tackled the issue of only showing/activating map tips when the corresponding layer is visible?
What event(s) do I need to listen for when a layer is made visible in order to instantiate map tips?

Thanks for the help!

-bert
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
At first glance, maptips should be active only when the layer is visible.
So instantiating the maptips in the xaml file should work.

Did I miss something?
0 Kudos
dotMorten_esri
Esri Notable Contributor
Correct. MapTips relies on the mouse entering/leaving a graphic. If the layer and thus the graphic is not visible, the maptip cannot "trigger".
0 Kudos
RobertMEIER
Regular Contributor
To be more clear/specific:

I have a layer in my map service and in the map and want to create map tips for it.

I create a feature layer in xaml pointing to the same layer and render it with a transparent symbol, so it appears that when the user hovers over the feature from the map service they get the map tip.

I want a way to connect the visibility of the layer in the map service and the visibility of the feature layer that controls the map tips. So they work in concert with each other.

Or is there a way to connect map tips with a dynamic layer instead of a feature layer.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I want a way to connect the visibility of the layer in the map service and the visibility of the feature layer that controls the map tips. So they work in concert with each other.


Should not be too difficult by code : when you change the visibility of a dynamic map service sublayer, change at the same time the visibility of the associated feature layer.


Or is there a way to connect map tips with a dynamic layer instead of a feature layer.

No way to use maptips, but you could use an identify task (will avoid to load the features just to get maptips).
0 Kudos