Select to view content in your preferred language

Robert's Dynamic Legend exclude layers problem

964
4
11-13-2010 06:58 PM
IanHamilton
Deactivated User
So far I have not been able to exlcude any layers from the dynamic legend which otherwise is working normally. I am using arc 10 map services. At the moment I a trying to exclude the whole map service
example is as follows.
<excludelayer mapservice="Rail Labels (36K-18M)"></excludelayer>

Has anyone else come across this.
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Ian,


   Is "Rail Labels (36K-18M)" the name of the Map service in your config.xml? If not that is the issue.
0 Kudos
IanHamilton
Deactivated User
Robert,

Unfotunatley it is unless I have made a typo in all the various attemps I have made. I basically have various "label layers" which I don't want to appear in the legend at all. These are duplicate layers of the respective line work layer. e.g. rail linework for example with no colour set for the line and dynamic labelling switched on.

My set up uses multiple layerlist xml files using a single instance of layerlistwidget (the exclude layer in the respective xml files for this widget works). The dynamic layer list widget is behaving correctly in this set up, except for the exlude layers part.

A bit of a puzzle
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ian,

   Hmm... I guess the best thing to do is have you post your config.xml and I will attempt to duplicate your setup.
0 Kudos
IanHamilton
Deactivated User
Robert thanks for taking a look at this, much appreciated. I hoping it's something really stupid I've done!

I attach the config file and the dynamic legend xml file
I had to take some things out as the post was too big.
But you should get the idea.


<configuration>

    <!-- UI elements -->
    <widget left="10"  top="50"    config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
    <widget right="-2" bottom="-2"  config="widgets/OverviewMap/OverviewMapWidget.xml" url="widgets/OverviewMap/OverviewMapWidget.swf"/>
    <widget left="600" top="55"     config="widgets/MapSwitcher/MapSwitcherWidget.xml" url="widgets/MapSwitcher/MapSwitcherWidget.swf"/>
    <widget left="3" bottom="3" config="widgets/Coordinate/CoordinateWidget.xml" url="widgets/Coordinate/CoordinateWidget.swf"/>
    <widget left="0"   top="0"     config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>



<!--<map wkid="102100" initialextent="12042000 -5619000 17795000 -952000">
-->
    <map WKID="3857" initialextent="12042000 -5619000 17795000 -952000">
        <basemaps>
        </basemaps>
       
       
        <operationallayers>
      <layer label="Hide Bing" type="dynamic" visible="false" alpha="1"  WKID="3857"
          url="http://MYSERVER/ArcGIS/rest/services/ImageryBaseMapsEarthCover_Base_Web_Merc/MapServer"/>

<!-- TRANSPORTATION -->
   <layer label="Rail (36K-18M)" type="tiled" visible="false" alpha="1"
     url="http://MYSERVER/ArcGIS/rest/services/Transportation_Rail/MapServer"/>
   <layer label="Roads (36K-18M)" type="tiled" visible="false" alpha="1"
     url="http://MYSERVER/ArcGIS/rest/services/Transportation_Road/MapServer"/>

<!-- TRANSPORTATION -->


<!-- LABELS -->
   <layer label="Place Names (72K-144K)" type="tiled" visible="false" alpha="1"
     url="http://MYSERVER/ArcGIS/rest/services/Location_Places/MapServer"/>
   <layer label="Rail Labels (36K-18M)" type="tiled" visible="false" alpha="1"
     url="http://MYSERVER/ArcGIS/rest/services/Transportation_Rail_Labels/MapServer"/>
   <layer label="Roads Labels (36K-18M)" type="tiled" visible="false" alpha="1"
     url="http://MYSERVER/ArcGIS/rest/services/Transportation_Road_Labels/MapServer"/>
   <layer label="Rivers Labels (36K-18M)" type="tiled" visible="false" alpha="1"
     url="http://MYSERVER/ArcGIS/rest/services/InlandWaters_RiversWaterbodies_Labels/MapServer"/>
   <layer label="Basins Labels (36K-18M)" type="tiled" visible="false" alpha="1"
     url="http://MYSERVER/ArcGIS/rest/services/InlandWaters_Basins_Labels/MapServer"/>
   <layer label="Localities Labels (36K-144K)" type="tiled" visible="false" alpha="1"
     url="http://MYSERVER/ArcGIS/rest/services/Boundaries_Locality_Labels/MapServer"/>
   <layer label="LGA Labels (36K-144K)" type="tiled" visible="false" alpha="1"
     url="http://MYSERVER/ArcGIS/rest/services/Boundaries_LGA_Labels/MapServer"/>
<!-- LABELS -->


        </operationallayers>

    </map>

    <!-- widgets organized into widget containers that manage close/open etc -->
    <!-- supported layout property options: horizontal(default)|float|vertical|fix-->
   
<!--    <splashpage label="Meta Data" config="widgets/Splash/SplashWidget_GHD_Metadata.xml" url="widgets/Splash/SplashWidget.swf"/>
-->  
    <!-- DISCLAIMER -->
    <widget icon="assets/images/Legend_SheepFire4.png"
       right="150" bottom="4"
             config="widgets/StaticImage/StaticImageWidget.xml"
             url="widgets/StaticImage/StaticImageWidget.swf"/>
    <!-- DISCLAIMER -->
                
    <widgetcontainer layout="float">
<widget label="Dynamic Legend" x="90" y="50"  preload="open"
    icon="assets/images/Legend_popdensity.png"
    config="widgets/DynamicLegend/DynamicLegendWidget.xml"
  url="widgets/DynamicLegend/DynamicLegendWidget.swf"/>
        <widget label="Bookmarks"         left="470" top="80"
                icon="assets/images/i_bookmark.png"
                config="widgets/Bookmark/BookmarkWidget.xml"
                url="widgets/Bookmark/BookmarkWidget.swf"/>

        <widget label="Find a Place Name (GA Places)"   left="470" top="110" preload="closed"
                icon="assets/images/i_target.png"
                config="widgets/Locate/LocateWidget_GA.xml"
                url="widgets/Locate/LocateWidget.swf"/>               
        <widget label="Find a Place Name (Gazetted QLD)"   left="470" top="140" preload="closed"
                icon="assets/images/i_target_green.png"
                config="widgets/Locate/LocateWidget_Gazette_QLD.xml"
                url="widgets/Locate/LocateWidget.swf"/> 
              
        <widget label="GHD Offices"    left="470" top="170" preload="closed"
            icon="assets/images/i_pin.png"
            config="widgets/Query/QueryWidget_GHD_Locations.xml"
            url="widgets/Query/QueryWidget.swf"/>
           
        <widget label="Search"    left="470" top="201" preload="closed"
                icon="assets/images/i_search.png"
                config="widgets/Search/SearchWidget.xml"
                url="widgets/Search/SearchWidget.swf"/>
        <widget label="Draw and Measure" left="470" top="231"
                icon="assets/images/i_draw2.png"
                config="widgets/Draw/DrawWidget.xml"
                url="widgets/Draw/DrawWidget.swf"/>
        <widget label="Print" left="470" top="264"
                icon="assets/images/i_print.png"
                config="widgets/Print/PrintWidget.xml"
                url="widgets/Print/PrintWidget.swf"/>
               
<!--  <widget label="Identify" left="330" top="80" preload="open"
                icon="assets/images/i_info.png"
                config="widgets/Identify/IdentifyWidget.xml"
                url="widgets/Identify/IdentifyWidget.swf"/>
-->
    </widgetcontainer>
   
   


   <widgetcontainer layout="vertical">
                
         <widgetgroup label="Layers" icon="assets/images/i_layers.png">
             <widget label="Biota (2)"
                icon="assets/images/i_biomass.png"
                config="widgets/LayerList/BiotaLayerListWidget.xml"
                url="widgets/LayerList/LayerListWidget.swf"/>

              <widget label="Boundaries (3)"
                icon="assets/images/edit_polygontool.png"
                config="widgets/LayerList/BoundariesLayerListWidget.xml"
                url="widgets/LayerList/LayerListWidget.swf"/>
               


             <widget label="Planning Cadastre (15)"
                icon="assets/images/i_lego.png"
                config="widgets/LayerList/PlanningCadastreLayerListWidget.xml"
                url="widgets/LayerList/LayerListWidget.swf"/>
<!--
             <widget label="Structure (17)"
                icon="assets/images/i_measure.png"
                config="widgets/LayerList/LayerListWidget.xml"
                url="widgets/LayerList/LayerListWidget.swf"/>
-->

             <widget label="Transportation (18)"
                icon="assets/images/i_servicearea.png"
                config="widgets/LayerList/TransportationLayerListWidget.xml"
                url="widgets/LayerList/LayerListWidget.swf"/>
                                                
<!--           <widget label="ImageryBaseMapsEarthCover"
                icon="assets/images/i_biomass.png"
                config="widgets/LayerList/ImageryBaseMapsEarthCoverLayerListWidget.xml"
                url="widgets/LayerList/LayerListWidget.swf"/>
-->
          <!--
             <widget label="Utilities Communications (19)"
                icon="assets/images/i_satellite.png"
                config="widgets/LayerList/LayerListWidget.xml"
                url="widgets/LayerList/LayerListWidget.swf"/> 
      -->
         </widgetgroup>               
     </widgetcontainer>

                  
               
               

</configuration>














<?xml version="1.0" ?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
// Copyright © 2008 ESRI
//
// All rights reserved under the copyright laws of the United States.
// You may freely redistribute and use this software, with or
// without modification, provided you include the original copyright
// and use restrictions.  See use restrictions in the file:
// <install location>/FlexViewer/License.txt
//
////////////////////////////////////////////////////////////////////////////////
-->
<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="Roads Labels (36K-18M)">0,1</excludelayer>
-->
     <excludelayer mapservice="Rail Labels (36K-18M)"></excludelayer>
     <excludelayer mapservice="Roads (36K-18M)"></excludelayer>
<!--     <excludelayer mapservice="LGA Labels (36K-144K)">0</excludelayer>
     <excludelayer mapservice="Localities Labels(36K-144K)">0</excludelayer>
     <excludelayer mapservice="Basins Labels (36K-18M)">0</excludelayer>
     <excludelayer mapservice="Rivers Labels (36K-18M)">0</excludelayer> 
-->
</excludeLayers>
<excludeGraphicLayers>true</excludeGraphicLayers>
</configuration>
0 Kudos