How do I show features from Multiple FeatureLayers in Popup

751
2
03-21-2014 06:10 AM
NickKouloungis
New Contributor III
I am creating a map that has overlapping polygons from multiple FeatureLayers and I want the user to be able to cycle through all features clicked in the popup window (i.e. 1 of 2, 2 of 2, etc.).  For example, when I click on a city, I would like to see the info for that city and then cycle to see the info for the County that contains it.  See my example code attached.  What am I missing?
0 Kudos
2 Replies
KevinMacLeod1
Occasional Contributor III
I am creating a map that has overlapping polygons from multiple FeatureLayers and I want the user to be able to cycle through all features clicked in the popup window (i.e. 1 of 2, 2 of 2, etc.).  For example, when I click on a city, I would like to see the info for that city and then cycle to see the info for the County that contains it.  See my example code attached.  What am I missing?


Here are some examples, which also discuss visibility and dealing with multiple services

http://jsfiddle.net/URpaW/

http://jsfiddle.net/kenbuja/nvNQw/

http://forums.arcgis.com/threads/83899-Paging-results-in-Popup-class-in-JS-API-3.4?p=295993&posted=1...
http://forums.arcgis.com/threads/52543-NLiu-s-Table-of-Contents%28TOC%29-Legend-widget-and-Visibilit...

I still haven't gotten a working multiple services identify but for now the logic from the second fiddle above works fine after I put everything in one service.
0 Kudos
TracySchloss
Frequent Contributor
I'm not using strictly featureLayers, but the logic should still be the same. Since I am using a TOC, the user has control of the visibility and  the identifyTask and identifyParameters have to be responsive to that.  Depending on what is currently turned on, the identify will show a popup window with the contents.  It managed multiple services and a variety of different outFields.  I'm managing those by defining an array for each layer at the top and then generating the infoContent on the fly.  Assuming you're using something like Firebug in Firefox you should be able to see my code.

https://ogi.oa.mo.gov/LEGIS/LegislativeDistrict/index.html
0 Kudos