I have been using the ArcGIS Viewer for Flex for quite a while. I couldn't help noticing there were still two widgets, one for Table of Contents (TOC) and the other for Legend.

It looks to me TOC is a layer tree with checkboxes but no icons, while legend is a layer tree with icons but no checkbox.

What's the difference between TOC and legend in a web mapping app or anywhere?

Web apps certainly can do both. GeoPDF allows you to toggle layers.

Unless you want to print a map out, personally I don't see a reason that those two are separated.

For those who see significant differences, please take a look at the screenshots on my blog (The site doesn't allow me add an image because I am new?!). Or maybe try a custom widget on FlexViewer 2.2 for a clickable legend or a TOC with layer icons. And since search rules all nowadays, it allows you to search layers across services by keyword.

Then tell me if you still see they are two or one.

enter image description here

  • added image, (there were 2 others not added) Mar 30, 2011 at 13:21

4 Answers 4


A Map Legend is a static representation of features on the map and their meaning

enter image description here

A Table of Contents [TOC] is an interactive list displaying features on the map - some even showing what is visible in real-time.

enter image description here

  • Great explanation - the only thing I would change is that I don't think legends have to be "static". Mar 31, 2011 at 3:35
  • maybe should of used the word 'traditional ' map legends.... as in pre-electronic mapping.
    – Mapperz
    Mar 31, 2011 at 3:42

I think the general difference between a TOC and a Legend is that a TOC allows for control of the map. Depending on the application the TOC allows you to change the visibility and / or drawing order of map layers. A legend on the other hand does not allow for map control and is a representation of symbology used in the map.

In terms of a web mapping app there are instances where you would want to show the symbology scheme in a legend format without allowing manipulation of the map. Some applications do not allow users to control map layers, but take care of this internally based on scale or some other factor.

I have not used the Flex API much, but for the ESRI Javascript API there are examples of a TOC which also shows symbology. Also available are strict legends which show your symbology icons but do not allow manipulation of map data.

  • Actually I see a trend of merging TOC and legend together, especially in web mapping apps. What do you think? Mar 30, 2011 at 14:04
  • I guess it goes back to your definition of a TOC. If you take my view stated above, there are plenty of web apps that do not allow user to manipulate map data through the TOC, but control this based on scale or something else. However if you are going to allow user control over those things then there is certainly reason to combine a TOC and legend.
    – badkins
    Mar 30, 2011 at 14:17

For me, a TOC should represent all symbols that are anywhere in the map (either inside or outside the current mapextent). A Legend should be (or at least have the option to) show symbols only for things that are visible within the current mapextent. When a TOC is used as a legend for a map with many different symbols - where only a few of those symbols appear on the current mapextent - readability suffers.

  • First of all, thanks for adding images. I think you have brought a good idea on readability. Although I think we should keep all layers, it would be nice that we could have a way to easily differentiate the layers with data within the current map extent from those without any. Mar 30, 2011 at 13:59
  • I'm working on an oil & gas app. The wells use standard symbols. I'm using a scale threshold such that when the user is zoomed close enough for the symbols to appear, there are rarely more than 3 or 4 of the possible symbols present in the map at any given time. Any thoughts on this use case? Mar 30, 2011 at 15:19

I think there is a significant functional difference between a Legend and a TOC.

  • Legend - helps users interpret the map
  • TOC - helps users turn on/off certain features, change properties on them, and re-order layers.

Still, this doesn't mean you couldn't show symbology in the TOC (even though the Flex Viewer doesn't currently support that out-of-the-box). It's just that for certain things it isn't always needed. For example, when using a basemap from Bing, Google, or ArcGIS Online, most people can interpret which features are water and which features are roads and highways. Also, with imagery a legend isn't always useful.

Also, by having a Legend that focus only on the key layer(s) needed, the Legend can be a great way of explaining the purpose of your application - without cluttering it with layers that people don't need interpreting.

As for scale-dependency which a few people brought up here, I think that both a TOC and a Legend can benefit from visually indicating if features are in-range, either by greying them out or removing them or otherwise clearly marking them as out-of-range (like in Mapperz ArcMap example). The Legend widget in the Flex Viewer supports the first two options using a respectcurrentmapscale tag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.