Select to view content in your preferred language

Layerlist - Sublayers

2357
2
Jump to solution
07-10-2012 06:26 AM
ShaningYu
Honored Contributor
I created a map service, which draws the map service dynamically from the data.  In the Layerlist widget, the sublayers are not in the list.   Referring ESRI provided the config.xml, I have realized I need to add some code for the sublayers like that:
            <layer label="Demographics" type="tiled" visible="false" alpha="0.5"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Median_Household_Income/MapServ...">
                <sublayer id="1" popupconfig="popups/PopUp_Demographics_BlockGroups.xml"/>
                <sublayer id="2" popupconfig="popups/PopUp_Demographics_Tracts.xml"/>
                <sublayer id="3" popupconfig="popups/PopUp_Demographics_Counties.xml"/>
                <sublayer id="4" popupconfig="popups/PopUp_Demographics_States.xml"/>
            </layer>
My questions are below:
1) How to create the xxx.xml?
2) Where the xml files should be stored?
Thanks if you can provide your advice.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Shaning,


  1. Right click the popups folder in flash builder for your Flex Viewer project and choose new > File and name it PopUp_???.xml Then copy and paste the text from one of the existing PopUp.xml files and modify it for your needs.

  2. As mention in answer one you create it in the popups folder.

Of course I don't see what any of this has to do with sub layers appearing in the LayerList widget though. All this will do is allow you to specify popups for individual sublayers of a dynamic or tiled map service.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Shaning,


  1. Right click the popups folder in flash builder for your Flex Viewer project and choose new > File and name it PopUp_???.xml Then copy and paste the text from one of the existing PopUp.xml files and modify it for your needs.

  2. As mention in answer one you create it in the popups folder.

Of course I don't see what any of this has to do with sub layers appearing in the LayerList widget though. All this will do is allow you to specify popups for individual sublayers of a dynamic or tiled map service.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
ShaningYu
Honored Contributor
Great!  Thanks a lot.
0 Kudos