Select to view content in your preferred language

Dynamic legend exclude layers problem

2493
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
RobertScheitlin__GISP
MVP Emeritus
Ian,

   There is nothing in the documentation or code that supports:
<excludelayer mapservice="Hide Bing"></excludelayer> 


The only thing that is supported is excluding items from the legend:

<LegendexcludeLayers>
  <!--LegendexcludeLayer mapservice="Parcel Data">68</LegendexcludeLayer-->
 </LegendexcludeLayers>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ian,

   It looks like adding support for excluding whole map services is not to hard so I am working on it. I will not be supporting excluding individual map service layers in the TOC though.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ian,

   New Version 2.2.2 is now available.
0 Kudos
IanHamilton
Deactivated User
Robert,

thanks for you help, will be a life saver if this works for me.
I was not able to find 2.2.2 from the download site.

Thamks
Ian
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ian,

   Hang tight I did this for the TOC widget and did not pay attention that you were talking about the dynamic legend.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ian,

   WOW this is the problem with having so much code out there. DISREGARD everything I have said so far.

The Dynamic Legend Widget is designed to exclude individual map services or sub layers of that map service. I have tried and tried an I can not duplicate your issue. I thought it might be that your services were tiled so I tested that. I though it might be and issue with the extra blank lines inside of your excludeLayers parent element. I tested if the parentheses in the layer name could be the issue.

I have got to say I can see what your issue is.
0 Kudos
IanHamilton
Deactivated User
Hi Robert,

I can understand your problem with multiple requests for changes to all your work.

So the syntax of the dynamic legend xml is as I posted it?
It can exclude whole mapservice or sublayer?

The only thing I can think of is that I have multiple instances of layerlist widget. But the dynamic legend is displayng the correct layers at the correct scales from any layers switched on from any of the layerlist widgets it just does not seem able to filter out any services/layers I put in the exclude list.

Thanks again,

Ian
0 Kudos
IanHamilton
Deactivated User
Robert,

I downloaded a fresh version of the dynamic legend , removed my old one and re built the app. The dynamic legend now works with my exclude layers. It must have been some sort of build issue.

Thanks again,

Ian
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ian,

   Good to hear.
0 Kudos