PresetsOpenLayers presets contain
- Map Settings
- Height, width
- OpenLayers source file, theme location, ProxyHost
- Enabled Behaviors
- Enabled Layers
- Enabled Styles
OpenLayers Map Views
OpenLayers Map Views pull from OpenLayers Presets
Layer TypesLayer types are plugins. A base set of layer types is provided within the OpenLayers module, and other contrib modules like MapBox can provide even more. Layer Types generate Layers and provide their functionality
LayersLayers are exportables which contain per-layer configuration.
StylesStyles are exportables which contain OpenLayers Styles. They are attached to layers by the configuration in Presets.
Plain-English ExplanationStyles are exportables, as simple as that, they don't have any functionality and have a very simple interface
Layer types are basically factories for layers and provide their functionality. They're ctools plugins, so they're loaded via that framework, but they aren't exportables because they're functional, rather than data. A
layer_typegenerates layers, which are, in fact, exportables, which are tied back to the layer_type that created them. At runtime, a layer_type is initialized as an object (which has the all-important
render()function) with a layer, to provide them with configuration and data. And layer types can also provide another function outside of this -
the settings_form()allows a layer to define a per-site setting, which is most commonly an API key.
Of course, this is a bit un-obvious with a quick glance over the code, but it's quite important, because this means that we can define new layer types outside of openlayers proper, which provide their own forms and functionality, and then make multiple layers with those layer types.
The same goes for behaviors: behaviors are basically factory objects, since they provide the same kind of
render()method and are also ctools plugins, but then give birth to instances of themselves, which are the behaviors you attach to each map. So as a result, behaviors can have per-map settings, like the zoomToLayer behavior can have a per-map setting of which layer to zoom to.
For more information about Drupal Development, Drupal Expert, Drupal Developer and Drupal Programmer visit at http://www.dckap.com