ol-ext
Cool extensions for OpenLayers (ol > 5.3).
ol-ext is a set of extensions, controls, interactions to use with Openlayers.
Quick start
Install ol-ext
Install the npm ol-ext package and link to the node_modules directory:
npm install ol-ext
See Openlayers quickstart to create an Openlayers project.
In the main.js
file add ol-ext classes:
// Import the layer switcher control
import LayerSwitcher from "ol-ext/control/LayerSwitcher"
const switcher = new LayerSwitcher;
// You can add it to the map
map.addControl(switcher)
Remember to import the style in your style.css
:
@import "node_modules/ol/ol.css";
@import "node_modules/ol-ext/dist/ol-ext.css";
html,
body {
margin: 0;
height: 100%;
}
/* ... */
Check out online examples.
The example page is the best way to have a quick look at all the library.
ol extension
- all extensions: list of all classes
- base: base extensions
- Map: adds methods to the map
- layer: usefull methods attached to layers
- source: new sources (DBPedia, hexagonal binning, georeferenced images, ...)
- controls: adds new controls (tool bars, Graticule, LayerSwitcher, Search, Profile, ...)
- style: a set of style functions to style features on the maps (charts symbols, FillPattern, FontSymbol, Photo, TextPath, ...)
- filter: filters to apply on layers (Colorize, Crop, Mask, ...)
- featureAnimation: animates features on the map.
Bugs
Please use the GitHub issue tracker for all bugs and feature requests. Before creating a new issue, do a quick search to see if the problem has been reported already.
Building the documentation:
The documentation use gulp-jsdoc3 to create the doc.
- install the gulp-jsdoc3 project at the root directory:
npm install gulp-jsdoc3
- then run the gulp command to create the doc in the doc/doc-pages directory:
gulp doc
Licence
ol-ext is licenced under the French Opensource BSD compatible CeCILL-B FREE SOFTWARE LICENSE.
(c) 2016-2019 - Jean-Marc Viglino