Select to view content in your preferred language

Dynamic legend exclude layers problem

2494
14
01-25-2011 09:34 PM
IanHamilton
Deactivated User
I am having continuing problems trying to exlcude layers for the dynamic legend.
No layer I specify in the config for dynamic legend is excluded.
I post some of the main config file and dynamic legend.xml  file.


Thanks for any  help.
Ian
configuration>
<!--mapservice must be specified, and is the label of the layer (Map Service) as
  listed in the config.xml. If no ids are listed for the excludeLayer, then
  the entire map service will be excluded from the legend. If you specify id(s)
  then only the id(s) of the mapservice will be excluded from the legened-->
<!--Example:
  <excludeLayer mapservice="Homeland Security Operations">0,1</excludeLayer>
-->
<excludeLayers>

     <excludelayer mapservice="Rivers Labels (144K-1M)"></excludelayer>
     <excludelayer mapservice="Basins Labels (144K-577K)"></excludelayer>
     <excludelayer mapservice="Rail Labels (72K-288K)"></excludelayer>
     <excludelayer mapservice="Rail Labels (72K-288K)"></excludelayer>
     <excludelayer mapservice="Boundaries_LGA_Labels"></excludelayer>
     <excludelayer mapservice="Localities Labels (36K-144K)"></excludelayer> 
     <excludelayer mapservice="Islands Labels (36K-288K)"></excludelayer> 
     <excludelayer mapservice="Hide Bing"></excludelayer> 

</excludeLayers>
<excludeGraphicLayers>true</excludeGraphicLayers>
</configuration>



Parts of config file


<layer label="Rivers,Waterways (144K-2M)" type="tiled" visible="False" alpha="1"  url="xxx/ArcGIS/rest/services/InlandWaters_RiversWaterbodies_rev_c/MapServer">

<layer label="Rivers Labels (144K-1M)" type="tiled" visible="false" alpha="1"
url="xxx/ArcGIS/rest/services/InlandWaters_RiversWaterbodies_Labels/MapServer">

<layer label="Drainage Basins (144K-2M)" type="tiled" visible="False" alpha="1"
url="xxx/ArcGIS/rest/services/InlandWaters_Basins_rev_c/MapServer"/>

<layer label="Basins Labels (144K-577K)" type="tiled" visible="false" alpha="1"
url="xxx/ArcGIS/rest/services/InlandWaters_Basins_Labels_rev_c/MapServer"/>
Tags (2)
0 Kudos
14 Replies
DustinKosmach1
Deactivated User
I didnt want to start a new thread, so Ill ask here.  How do you exclude a layer with the ESRI widget?  I cant figured it out and the documentation is very lacking on  the help page.  If you dont know, ill just make a new thread.  Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dustin,

  Did you not see this in the documentation?
<excludelayer> - When a layer is specified (by its name which should match the layer name in the Viewer application's main configuration file), it will not display in the Layer List widget. Multiple excludelayer tags can be specified if you wish to exclude multiple layers.


Link found here:

http://help.arcgis.com/en/webapps/flexviewer/help/widgets/legend_widget.htm
0 Kudos
DustinKosmach1
Deactivated User
that was I was reading.  I cant make any sesne out of it.  I tried the layers name itself, using the whole url, [] and "" and I cant get it to work.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dustin,

It is like this:

<excludelayer>Rivers Labels (144K-1M)</excludelayer>


Main config
<layer label="Rivers Labels (144K-1M)" type="tiled" visible="false" alpha="1"
url="xxx/ArcGIS/rest/services/InlandWaters_RiversWaterbodies_Labels/MapServer">
0 Kudos
PeterRussell
Occasional Contributor
Robert
I'm trying to use the Dynamic Legend widget in flexviewer 2.2 and no legend panel comes up at all.
I am using the compiled version.
I downloaded flexviewer 2.1 and it worked fine in 2.1.
Any ideas or help would be appreciated
Pete
0 Kudos