ol-ext for OpenLayers: Extensions, Controls and Interactive Map Features
Cool extensions for Openlayers (ol) - animated clusters, CSS popup, Font Awesome symbol renderer, charts for statistical map (pie/bar), layer switcher, wikipedia layer, animations, canvas filters.
At a glance
- What is it?
- ol-ext adds reusable controls, interactions, renderers, popups and visual effects to OpenLayers applications. It fits JavaScript projects that need these map features, but it adds a second library whose version and licensing must be checked against the host application.
- Who is it for?
- Adopt ol-ext when an OpenLayers application needs its existing controls, interactions or rendering features and the team can support the library's compatibility and licensing requirements. Do not choose it for a minimal map or a TypeScript project unless the separate declaration package has also been checked.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 31 days ago.
- What is it written in?
- Mainly JavaScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Why ol-ext extends OpenLayers Instead of Replacing It
ol-ext addresses a specific gap in OpenLayers applications. OpenLayers supplies the mapping framework, while application developers often have to build their own interface and presentation pieces around it. ol-ext packages additions for that surrounding layer: a layer switcher, CSS popup, Font Awesome symbol renderer, pie and bar charts for statistical maps, controls, interactions, animations, canvas filters, a legend control, a Wikipedia layer, timeline controls and undo or redo mechanisms.
The intended users are JavaScript developers building map interfaces with OpenLayers. The project is published as ES6 modules under the `ol-ext` package name. Its package metadata declares OpenLayers as a peer dependency of `>= 5.3.0`, which makes the dependency relationship explicit. `ol-ext` does not stand alone as a mapping engine.
That distinction matters when selecting the library. A map that only needs a basic OpenLayers view may gain little from loading extra controls and CSS. A portal with statistical symbols, timeline navigation, custom popups or specialized layer selection has a closer match to the package's feature list. The repository layout also includes separate example directories for animations, charts, canvas filters, controls, CSS popups, fonts, layers, legends, maps, interactions and search. Those examples provide the documented path for studying an actual feature in context.
How ol-ext Connects Modules, CSS and OpenLayers
The documented application architecture has three parts. The application installs OpenLayers, installs `ol-ext`, and imports the CSS and JavaScript modules required by its map. OpenLayers remains responsible as the host mapping library, while individual ol-ext classes provide the additional behavior.
The import example demonstrates this modular boundary. It loads `ol/ol.css`, loads `dist/ol-ext.css` from the package, and imports `LayerSwitcher` from the `control/LayerSwitcher` module. This means a bundler can include only selected JavaScript modules, although the README does not claim that every operation automatically downloads fewer assets. The package still exposes compiled files through `dist`, and the repository also provides both `.js` and `gulpfile.cjs` build files.
For direct web-page use, the README also describes a deprecated pure-JavaScript package named `openlayers-ext`. Its files are available under `node_modules/openlayers-ext/dist`, with individual modules under `node_modules/openlayers-ext/lib`. New ES6-based integrations should prefer the documented `ol-ext` package rather than treating the deprecated package as an equivalent long-term choice.
Installing ol-ext in a JavaScript Bundle
The supported bundler workflow starts by installing ol-ext. The README gives this command exactly:
npm install ol-extBecause OpenLayers is a peer dependency, the application must install it separately:
npm install olA JavaScript entry file then loads the OpenLayers stylesheet, the ol-ext stylesheet and the required extension class:
import "ol/ol.css"
import "ol-ext/dist/ol-ext.css"
import LayerSwitcher from "ol-ext/control/LayerSwitcher"The first line supplies OpenLayers styling. The second supplies ol-ext styling, which is needed for visual components whose appearance comes from the library's CSS. The import creates a usable `LayerSwitcher` binding in the module. The README excerpt does not show the complete map initialization or the call that adds this control, so those details must be taken from the linked examples or API documentation rather than inferred from the import alone.
The repository links to bundling examples for webpack, Parcel and Angular, while the README also lists Rollup and Browserify as supported module bundlers. It does not present one universal configuration file, so the bundler setup remains application-specific.
Direct Script Use and Browser Constraints
A plain web page can use the deprecated `openlayers-ext` package. The README documents this command:
npm install openlayers-extIt also permits copying the repository's `dist` scripts into a project. For a quick test, the documentation links directly to files under the GitHub rawgit domain, but explicitly does not recommend that method for production. A raw CDN branch reference can therefore change independently of an application's dependency lock and is a poor production choice.
The documented browser baseline is modern browsers supporting HTML5 and ECMAScript 5, including Chrome, Firefox, Safari and Edge. Older targets, including Internet Explorer down to version 9 and Android 4.x, require a transpilation and polyfill setup. The README names `requestAnimationFrame`, `Element.prototype.classList`, `Object.assign` and `URL` as APIs that may need polyfills. That compatibility list describes requirements; it does not promise identical behavior on every named legacy platform.
Where ol-ext Is the Wrong Level of Abstraction
The clearest wrong-tool case is an application that needs only the base map and OpenLayers controls. Adding ol-ext brings a larger surface of imports, styles, CSS classes and version compatibility that does not correspond to a stated requirement. The package does not document a particular bundle-size reduction or performance advantage, so those costs cannot be offset with an unconfirmed performance claim.
TypeScript users face another decision. The README links to declarations in the separate `Siedlerchr/types-ol-ext` repository. It gives an alias installation command for those declarations:
npm i -D @types/ol-ext@npm:@siedlerchr/types-ol-extThat declaration package is not part of the ol-ext repository described here. Its compatibility with a particular OpenLayers or TypeScript version therefore needs separate verification. A team should not infer full TypeScript support merely because a declaration package exists.
The package also contains broad optional functionality. Canvas filters, animations, statistical charts, search and specialized layers may involve separate API surfaces, data requirements or external service terms. The README does not document a universal setup that makes every extension safe to enable in one application.
Alternatives to ol-ext in an OpenLayers Project
The direct alternative is to implement only the required OpenLayers control or renderer inside the application. An application can implement the required controls, interactions or layers in its own code. An application-specific implementation can keep its UI conventions, data schema and update logic in local code, without adding ol-ext's stylesheet or its peer library to the runtime dependency set.
The difference is scope. ol-ext supplies ready-made implementations for features such as `LayerSwitcher`, CSS popups, Font Awesome symbols and chart symbols, and the repository includes examples for each area. Building those pieces directly means the developer owns more code and more compatibility work. Choosing ol-ext is therefore a trade between adopting existing feature modules and accepting another package in the OpenLayers dependency chain.
For page-level use, another documented path is the deprecated `openlayers-ext` build. That is a distribution alternative rather than a different implementation approach. It offers compiled scripts for a web page, but the README marks the package as deprecated, so it does not remove the need to evaluate the project's present ES6 packaging choice.
Release Cadence, Compatibility and Licensing Boundaries
The repository is not archived. Its last push was on 2026-09-22, and the listed releases include v4.0.36 on 2025-10-21, v4.0.37 on 2025-11-25 and v4.0.38 on 2026-02-23. The repository's package metadata currently shows version `4.0.39`. These facts indicate recent repository and package activity, but the README does not promise long-term release compatibility.
Compatibility must be checked at both package levels. The peer dependency permits `ol` versions from `>= 5.3.0`, but that range does not by itself establish that every extension works unchanged with every later OpenLayers release. The `main` and `style` entries point to `dist/ol-ext.js` and `dist/ol-ext.css`, while the documented ES6 workflow imports individual modules. Teams should verify which distribution their build process actually consumes.
The README identifies the license as the French Opensource CeCILL-B FREE SOFTWARE LICENSE and provides English and French license texts. It also says that BSD may be used for convenience when publishing content through webpack. The repository contains `LICENSE.md` and `LICENSE-BSD.md`. In addition, the README warns that mapping services and APIs used by a map may have separate licenses that must be checked separately. This review does not interpret the legal effect of those terms.
Editorial conclusion
Adopt ol-ext when an OpenLayers application needs its existing controls, interactions or rendering features and the team can support the library's compatibility and licensing requirements. Do not choose it for a minimal map or a TypeScript project unless the separate declaration package has also been checked. Verify first that the installed ol-ext release works with the application's OpenLayers version, then confirm the obligations of CeCILL-B and of any mapping services used by the finished map.
Frequently asked questions
How do I install ol-ext with OpenLayers?
Install both packages because OpenLayers is a peer dependency. Use `npm install ol-ext` for the ES6 package and `npm install ol` for OpenLayers.
How do I import a LayerSwitcher from ol-ext?
The README shows imports for `ol/ol.css`, `ol-ext/dist/ol-ext.css` and `LayerSwitcher` from `ol-ext/control/LayerSwitcher`. It does not show the complete map setup in that installation example.
Does ol-ext include TypeScript declarations?
The README links to declarations in the separate `Siedlerchr/types-ol-ext` repository. The documented package alias is `@types/ol-ext@npm:@siedlerchr/types-ol-ext`.
Can ol-ext be loaded directly in a web page?
The documentation describes a direct-script workflow through the deprecated `openlayers-ext` package or copied `dist` files. Linking to branch-hosted files is documented for testing and is not recommended for production.
Which OpenLayers versions are supported by ol-ext?
The package metadata declares `ol` as a peer dependency with the range `>= 5.3.0`. The documentation does not claim compatibility testing for every release within that range.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/viglino-ol-ext)Was this useful?