Overriding the OpenLayers library UI
The following concerns "skins" or "themes" for OpenLayers: sets of images and CSS to used to create map interface elements such as the zoombar, panning controls, and full-screen icon.
This is not not the same as OpenLayers Drupal theming, which allow map elements (such as tooltips) to be themed.
The OpenLayers library gets images and CSS from specifically named files (i.e. zoombar.png) but allows you do change the path to these assets.
In the OpenLayers module, CSS and images are specified on a per-preset basis.
Overriding a preset's theme
Via the web user interface
On a preset's editing page (i.e. http://mysite.tld/admin/build/openlayers/presets/MY_MAP/edit), specify the "Image path" and/or "CSS path". These paths may be relative to your Drupal root or absolute URLs to external resources.
Via the OpenLayers module API
In hook_openlayers_presets() add the image_path and/or css_path elements to a preset definition:
$my_presets->data = array(
...
'image_path' => 'http://js.mapbox.com/theme/dark/',
...
Available themes
Dark
- From MapBox
- Hotlink: set ImgPath to
http://js.mapbox.com/theme/dark/ - Download: Git clone or download tarball from developmentseed's GitHub account
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion