Select to view content in your preferred language

How to communicate between SFV widgets?

732
2
06-15-2010 11:52 AM
PeterHanmore
Emerging Contributor
I'm trying to implement an enhancement to the identify tool which would update the identifyParams.layerIDs to the ID of the currently selected layer in the TOC.  I haven't been able to figure out a simple way of determining the state of the TOC (from LiveMapsWidget.mxml) in the IdentifyWidget.mxml.  Is there a way to get a reference to the toc object?  Has anyone else already done an updated Identify widget that accomplishes this task (I have looked but haven't seen any)?  Is there any general documentation available on how you can communicate / query between objects in different widgets?

Thanks for any pointers in the right direction.

Peter Hanmore
Programmer / Analyst
Land Information Ontario
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Peter,

   Here is the code to do exactly what you are after.
0 Kudos
PeterHanmore
Emerging Contributor
Thanks very much ... it worked great!  Gave me some insight into how the whole communication thing happens too.  Ended up extending it a bit more to zoom to feature extent instead of the default of just zooming to the point clicked on.

Cheers,
Peter.
0 Kudos