Select to view content in your preferred language

MapTip from multiple feature layers

588
4
09-13-2012 02:34 PM
MikeDuppong
Emerging Contributor
Not sure if this is possible; figured I'd toss it out here in case someone had an idea for me.

I have two feature layers that are optional in the map; they may or may not be present.  If they are present, I would like to be able to let the user hover the mouse over a feature in feature layer 1, then show certain attributes from that feature as well as related data from feature layer 2 in a MapTip.

Any ideas?

Thanks in advance,

Mike
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
I have two feature layers that are optional in the map


Not sure how you create these feature layers but for sure a map can manage multiple feature layers with maptips.

If you create the feature layers by code on the fly, you can create the maptip at the same time by code.
0 Kudos
MikeDuppong
Emerging Contributor
I realize that multiple feature layers can be handled, each with MapTips; however I'm uncertain as to how to perform the procedure I have indicated.

I'm going to guess that I'll have to hook into a mouse event and when it slows to a certain point, find the nearest feature from layer 1, then fire off an async call to get the associated data from layer 2, then display it.  ?
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I'm going to guess that I'll have to hook into a mouse event and when it slows to a certain point, find the nearest feature from layer 1, then fire off an async call to get the associated data from layer 2, then display it. ?


The easier way to get maptips is to set the Maptip property of the FeatureLayers.

There is a sample here : http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#GraphicsMapTip

(the maptip is set in XAML but the same thing can be made by code).
0 Kudos
MikeDuppong
Emerging Contributor
Thanks Dominique - I've seen that example, and unfortunately that's not what I'm after.  I need to display data from more than one feature layer in a single MapTip.

Per original post: "show certain attributes from that feature as well as related data from feature layer 2 in a MapTip"
0 Kudos