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.

Note: the legends in the LayerTree are now added via the standard ExtJS 'icon' LayerNode property. Each icon is assigned the GetLegendGraphic URL with the RULE for the sublayer. Upcoming will be to have an embellished LayerNode that can be configured to automatically insert a LayerLegend (WMS or WFS).

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