Creating a table of contents control for layers

Table of Contents (ToC) controls such as UI elements are very common in desktop GIS software, such as ArcGIS Desktop, Mapinfo, and Geomedia. Also, their web counterparts make use of ToCs intensively in their UI, including ArcGIS and .Net web components.

The main use of ToCs is to turn On and Off the various raster or vector layers so as to overlay and view multiple strata of data. For vector layers, the options might be enriched by allowing the users to change the symbology of the vector layer with respect to ToCs.

The Google Maps UI does not have a built-in ToC control; however, with the flexibility of building up a custom control, there are virtually infinite possibilities.

The Google Maps JavaScript ...

Get Google Maps JavaScript API Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.