Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

170608
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
giuseppemolinario
Deactivated User
Giuseppe,

I know it has been close to a year since anything has been posted in this thread but after reading all of the posts I think I am dealing with a similar situation as you were.  I would like to display both raster and vector data in Robert's legend widget.  My raster data has been classified into three classes, and labeled appropriately in an mxd.  I created a map service of the mxd, and the rasters display just right, except they serve very little purpose if the user cannot see what each class means.  You mentioned figuring it out to some level and I was hoping you could point me in the right direction.

Thanks,
Chris


Hi Chris,

Unfortunately since my last post I have had a shift in priorities. My problem, which seems to be the same is yours, still does not have a solution. Robert's table of contents/legend combo widget is far more functional than the layer selector and the legend provided by ESRI with the flexviewer 2.2, yet it does not display raster legends. The ESRI legend widget does display rasters, hence I have been using it for my application, but with the following drawbacks: 1) it is not integrated with the table of contents or layer selector widget, so it takes up more map space, and 2) unless you want to have 2 legends displaying, you will use the esri  layer selector widget instead of robert's TOC widget and so you will not have a) layer transparency and b) scale dependency indication.

At some point I am hoping to be able to find the time to look at these widgets in flash builder and see if I can make the one I want out of the two of them, but someone much more knowledgeable then me in FLEX will probably get to it before I find the time to do that.

Let me know if I have answered your question or you need more info.

Giuseppe
0 Kudos
PaulGrimes
Deactivated User
Hi Robert, 

A great widget like all your other contributions, thanks.  One quick question, is there a way to order the layerlist in the TOC ...  I have the layers in the correct order in the config.xml but some of my more important layers need to be at the start of the list ....

Is there and easy way to do this?

Regards

PaulG
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Paul,

   No that is not a capability in this widget.
0 Kudos
JeffLegato
Regular Contributor
Robert,

I have noticed that if layers are organized in the service as a group the widget sees the groups but does not honor if the group is checked on or off.  It's not that pressing of an issue but it makes it a little confusing for my users who are used to ArcView where you can check on the layers within a group but leave the group checked off and the layers will not display. 

Just curious if I missed something in the setup process.

Thanks,

Jeff
0 Kudos
ChristopherBlinn
Emerging Contributor
Hi Chris,

Unfortunately since my last post I have had a shift in priorities. My problem, which seems to be the same is yours, still does not have a solution. Robert's table of contents/legend combo widget is far more functional than the layer selector and the legend provided by ESRI with the flexviewer 2.2, yet it does not display raster legends. The ESRI legend widget does display rasters, hence I have been using it for my application, but with the following drawbacks: 1) it is not integrated with the table of contents or layer selector widget, so it takes up more map space, and 2) unless you want to have 2 legends displaying, you will use the esri  layer selector widget instead of robert's TOC widget and so you will not have a) layer transparency and b) scale dependency indication.

At some point I am hoping to be able to find the time to look at these widgets in flash builder and see if I can make the one I want out of the two of them, but someone much more knowledgeable then me in FLEX will probably get to it before I find the time to do that.

Let me know if I have answered your question or you need more info.

Giuseppe


Hi Giuseppe,

Thank you for the reply and yes it did answer my question.

I too am wanting to sit down in Flash Builder and see if I can "combine the forces" of Robert's widget and the capabilities of displaying the raster legend, yet time is not on my side.

Until then, I will either go with the default legend or put a static image of the legend since all of my rasters use the same class values.  If I go with the static image route, I would love to figure out a way to make the image appear only when the raster layer(s) are active.  So I guess I will start working on that.

Thanks again!
Chris
0 Kudos
ChristopherBlinn
Emerging Contributor
Giuseppe,

This is a link to a TOC/Legend widget that supports rasters and vectors.  Make sure to have SP1 if you're using version 10.

Best,
Chris

http://www.arcgis.com/home/item.html?id=cd57c351fb9a4167853c04ec9380c8b1
0 Kudos
NathanEnge
Esri Contributor
Robert
is there a way to suck in visible WMS legends given this:...
 <Layer queryable="1" opaque="0" cascaded="0">
        <Name>FADM_CASCADE_MTN_BOUNDARY_C</Name>
        <Title>Cascade Mountain Boundary - Colour Filled</Title>
<!-- WARNING: Mandatory mapfile parameter '(at least one of) MAP.PROJECTION, LAYER.PROJECTION or wms_srs metadata' was missing in this context. -->
        <LatLonBoundingBox minx="-141.188" miny="45.971" maxx="-109.658" maxy="61.1846" />
        <MetadataURL type="TC211">
          <Format>html</Format>
          <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="https://apps.gov.bc.ca/pub/geometadata/metadataDetail.do?recordUID=52400&amp;recordSet=ISO19115"/>
        </MetadataURL>
        <Style>
          <Name>default</Name>
          <Title>default</Title>
          <LegendURL width="186" height="25">
 <Format>image/png</Format>
 <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://openmaps.gov.bc.ca/mapserver/geology-and-soils?service=WMS&amp;version=1.1.1&amp;service=WMS&...>
 </LegendURL>
        </Style>
        <ScaleHint min="0" max="17461.5996950373" />
    </Layer>

So that the legend symbology for these WMS layers can be appended to the legend/toc that currently reads REST?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nathan,

  It might be possible... I just don't have any time to invest into this widget right now. Zilla has a TOC/Legend widget here

http://www.arcgis.com/home/item.html?id=cd57c351fb9a4167853c04ec9380c8b1

and I think Zilla is looking into WMS support.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Giuseppe and Chris,

  I have verified that classified rasters generate a legend in my 2.3.4 version and MANY other imporvements have been made.

Version 2.3.4 - 2 June, 2011
* Removed white background from legend.
* Added ability to exclude basemaps from the legend (this is now the default).
* Verified that classified rasters are now supported if you are using ArcGIS Server SP1 or greater
* Set the legend timeout to 60 Seconds for those with slow servers (configureable in xml)
* Added better handling of layers that come from a slow server when it comes to building the legend
* Added ability to internationalize the text for transparency slider tooltip, layer details button tooltip,
  Context menus.
* Transparency/Opacity is now contolled by one slider at the top of the widget. You but select a map service
  in the TOC for it to become enabled.
* Added Zoom to Layer Extent context menu for individual map service layers
* Added Map Service description button and indivdual layer description and copyright alert when details button
is pressed. Details button can be disabled in TOCWidget.xml
0 Kudos
ChrisBruce
Regular Contributor
Thanks so much Robert! I'm looking forward to trying the new version.

While I'm on this subject there's something I've been asked to do that I haven't had much time to look into yet but I'm wondering if you can point me in the right direction. I have a widget for creating a PDF of the map and I'd like to put a legend on the PDF. Is there a way to capture an image from your legend widget that I could add to my PDF?
0 Kudos