Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

122660
664
12-01-2010 07:30 AM
RobertScheitlin__GISP
MVP Emeritus
All,

Here is the next in my line of widgets for the FlexViewer 2.x.

The legend portion of this widget is the same code as my dynamic legend widget so,

IT IS FOR ARCGIS SERVER 10 OR GREATER ONLY

This is just a simple TOC Widget that includes my dynamic legend component.
This widget also includes my enhancement for map service transparency,
right click context menu for zoom to make layer visible, and my scale
dependent renderer for the TOC checkboxes.
Tags (2)
0 Kudos
664 Replies
LewisLock
Deactivated User
This widget works fine when layers are listed in the TOC as part of a 'dynamic' layer.  But when the same layers are listed individually as 'feature' layers, their labels get ignored.  Is there a way to remedy this?  Thanks very much, Lewis.
0 Kudos
LeroyChristophersen
Emerging Contributor
This widget works fine when layers are listed in the TOC as part of a 'dynamic' layer.  But when the same layers are listed individually as 'feature' layers, their labels get ignored.  Is there a way to remedy this?  Thanks very much, Lewis.


I have not had trouble with getting features to display, the part that seems to happen is that they get listed twice and to remove one removed them both from the TOC.  Hope Robert can provide some insight.  Leroy
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Guys,

   Waht you are seeing is by design and I have no plans to change the design.

Basically the parent leaf in the TOC for a layer of type feature will get the label that is specified in the main config.xml and the child leaf listed under the parent will get the name of the actual layer for the rest end point.

for example on my live demo site there is a feature type layer listed with the label of label="Parcel Data" and the actual actual layer that it points to is called (name) Owner Parcels.
0 Kudos
NathanBell1
Emerging Contributor
Robert,

Could you please provide me a URL for the 2.4 release of this widget? All I am able to find is the 2.5 version and I really would like to use your great widget!!

Thanks,

Nathan Bell
0 Kudos
LewisLock
Deactivated User
Hi Again--sorry for the confusion.  What I am trying to say is that the feature's labels in the Map (not in the TOC list) are ignored by TOC when they are referenced as feature layers.  When layers from the same service are referenced as a dynamic layer by TOC there is no problem.  Please see attached .jpg panels.  Thanks very much!! Lewis.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Louie,

   What you are seeing is a limitation of the Flex API and REST as labels are not currently supported on layers of type="feature".
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nathan,


   Sure here it is.


Don't forget to click the top arrow (promote) as shown below:
0 Kudos
NathanEnge
Esri Contributor
Robert
Any ideas why the dynamic legend would be reversing the layer orders from the REST Services Directory:
http://www.mapservices.ca/ArcGIS/rest/services/Mapit/Mapit/MapServer

T
he dynamic legend looks like this:
[ATTACH=CONFIG]13597[/ATTACH]

Here is the XML config for the TOC/Legend:
<configuration>
 <labels>
  <visibilitylabel>Layer Visibility</visibilitylabel>
  <legendlabel>Show Dynamic Map Legend</legendlabel>
  <alphatooltip>Select parent map service to set opacity</alphatooltip>
  <metadatatooltip>Show details</metadatatooltip>
  <zoomtoextent>Zoom To Layer Extent</zoomtoextent>
  <expandall>Expand All Layers</expandall>
  <collapseall>Collapse All Layers</collapseall>
  <zoomtomakevisible>Zoom To Make Visible</zoomtomakevisible>
  <generatinglegendmsg>Generating TOC Legend</generatinglegendmsg>
 </labels>
 <tocsettings>
  <expanded>true</expanded>
  <showdescriptionbutton>true</showdescriptionbutton>
  <collapselegends>false</collapselegends>
 </tocsettings>
 <legendtimeout>60</legendtimeout>
 <excludelayers >
  <excludelayer mapservice="Hybrid"></excludelayer>
  <excludelayer mapservice="Map"></excludelayer>
  <excludelayer mapservice="Satellite"></excludelayer>
  <excludelayer mapservice="IDL Test"></excludelayer>
  <excludelayer mapservice="ETeam"></excludelayer>
  <excludelayer mapservice="Base"></excludelayer>
  <!--<excludelayer mapservice="Radar"></excludelayer>-->
  <excludelayer mapservice="MapIt">6,7</excludelayer>
  
 <!-- <excludelayer mapservice="Parcel Data">19,20,21</excludelayer>-->
  
 </excludelayers>
 <excludegraphiclayers>true</excludegraphiclayers>
 <excludebasemaplayers>true</excludebasemaplayers>
</configuration>


We are using the uncompiled 2.5.0.2 with Flex API 2.5 Flashbuilder 4.6

We tested using your compiled version in our web app, and still the legend is reversed. What do you think?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nathan,

   No I have no idea... All my map services are displayed in the same order as listed in the REST Service directory. The only difference is that I am on ArcGIS Service pack 4 and you are still on 2.
0 Kudos
NathanEnge
Esri Contributor
Nathan,

   No I have no idea... All my map services are displayed in the same order as listed in the REST Service directory. The only difference is that I am on ArcGIS Service pack 4 and you are still on 2.


Thanks....
so We started a new flewxviewer project from scratch, and the TOC works fine. So it could be a conflict with other widgets. We are going to systematically comment/uncomment each widget until we find the one that conflicts...we have a number of custom ones that query the rest services...

let you know what we find.
0 Kudos