About this Example


This example shows how to create what could be called "sublayers". Each sublayer shows a subset of the original Layer's data using a per-sublayer filter. No specific Heron-widget is used or required for actual filtering nor styling. Standard OpenLayers WMS and Vector/WFS Layer Filtering and Styling is applied. Only for WMS-sublayers, GeoServer's CQL-extension is used (see below), although with MapServer a similar mechanism (SQL) may be applied.

WMS and WFS sublayers use OpenLayers-Layer-specific filtering and styling to create the effect of "sublayers".

WMS Layers use the GeoServer-CQL Vendor extension and the standard Layer SLD. Via the standard WMS GetLegendGraphic RULE parameter the legend for that subselection is chosen.
WFS Layers use standard OGC-filter expressions, plus per-Layer explicit styling using OpenLayers Style objects.

The legends in the LayerTree are added in one of two ways.

Note that the LayerTreePanel uses the config option layerIcons : 'bylayertype', such that Vector and Raster Layers get their own icons (i.s.o. the dull ExtJS/Windows document icon).

Usage

Switch on/off different subsets of the USA States Layer. Each subset shows states with a specific population count.

Widgets

This example extends/modifies the standard Heron-default example. The Layers are redefined and put into a standard Heron Layer tree widget. See the Config.js here

See also

TBS