Multi-layer map style inheritance

The default style used by olwidget is a bright magenta. This style is designed for maximum visibility on varied base layers – it is "flourescent" – but it is not ideal for many applications.

This map demonstrates using olwidget's style inheritance. Styles can be defined at the geometry level, the layer level, and the map level. The inheritance structure ensures that the style propagates nicely:

        default styles (magenta) < map styles < layer styles < geometry styles (info layers only)
        
Single layer map types such as olwidget.InfoMap have the same inheritance structure, but lack a separate "layer" level style. Editable types don't have a separate "geometry" level style.

In this example, there are several levels of style. For example, consider the "Colorado" geometry:

Default styleMap styleStates layer style"Colorado" geometry styleResult
fillColor: '#ff00ff'fillColor: "red"fillColor: "green"fillColor: "green"
strokeColor: '#ff00ff'strokeColor: "red"strokeColor: "red"
fillOpacity: 0.5fillOpacity: 0.5
strokeWidth: 2strokeWidth: 6strokeWidth: 1strokeWidth: 1

The same principles of inheritance hold for other layer options specified at the map level, such as names and clustering.