This example shows loading so called "Heron Map Contexts" (HMC). A HMC is an XML file that defines the settings for the (OL) Map, its Layers and a LayerTree (in a LayerTreePanel). The latter only if present.
In later versions we will add HMC Loading/Saving and possibly "Theme-switching" within the app. Possibly Bookmarks can also use HMC.
This this example loads the HMC: pdok-merged.xml. Other HMCs, even remote, can be loaded via the query param context=. For example:
This this example loads the configuration: Config.js.
Basically two steps in configuring:
1) define Heron.layout.mapContextUrl to point to a local path or remote URL.
2) configure MapPanel and LayerTreePanel to use the global map context via config parm: 'useMapContext: true'.
The advantages are: verifyable format, no separate Map Layers and LayerTree configs, reuse of definitions.
The Schema (XSD) for the Heron MapContext is defined at: http://schemas.heron-mc.org/hmc/1.0/heron-map-context.xsd
Find HMC file examples there: http://schemas.heron-mc.org/hmc/1.0
MapPanel and LayerTreePanel are aware of global context loading via Heron.App via the config parameter 'useMapContext'