Select to view content in your preferred language

Rollover tooltip or InfoWindow for Feature Layer using ESRI Flex Viewer

2558
2
02-02-2011 12:25 PM
DavidMarley
Frequent Contributor
I am trying to achieve a rollover tolltip or InfoWindow effect for a feature layer.  I've been using the "FeatureLayer tooltips" and "InfoWindow on MouseOver" samples as starting points.  But the problem is I am working in an application based on the ESRI Flex Viewer, and I am having trouble figuring out when/where to attach the "Graphics Add" event handler to the feature layer. 

From what I gather from the samples above, that handler must be added before the graphics are added to the layer, and therefore before the layer itself is loaded.  Therein lies the problem when using the Flex Viewer.  In the sample, this is easily addressed because the event can be attached right in the map/layer markup - it is not so easy (I don't think) in the Flex Viewer.

So the question is, where can I attach this event handler in the context of a Feature Layer in the  ESRI Flex Viewer?  I've been digging around under src/com/esri/viewer - it looks like I would have to do something custom within MapManager.mxml (for example, in the addLayerToMap method).

Am I on the right track here? What's the best way to go about this?
Tags (2)
0 Kudos
2 Replies
KenBuja
MVP Esteemed Contributor
You may get a good response from the Viewer Forum
0 Kudos
DavidMarley
Frequent Contributor
Thanks Ken - Yes for some reason I always forget there is a Viewer forum as well.  Kind of wish they had just one forum for Flex.

In fact it looks like there might be a widget to do more-or-less what I am looking for - this will be a start at least:

http://forums.arcgis.com/threads/21718-Feature-Tooltip-Maptip-for-FlexViewer-2.2?highlight=maptip

Thanks for the tip.
0 Kudos