Comfortable and convenient Openlayers helpers for standard usages.
This library provides interfaces to ease common usage of Openlayers in a web application using web-components. It:
- Adds identifier to layers, interactions and controls to be able to get and manage them in every component.
- Adds some observables for features. They are accessible in the group, and you don't need to follow the feature or the layer itself to be noticed by a change.
- Simplifies the interactions: enable one tool at once, manage interactions by group (create, store, destroy, toggle).
- Add some utils, shortcuts and helpers function.
Ol-Comfy is built in a non-binding manner: take only what you need, extend what you need. Every class is responsible for what they manage and store/retrieve information in/from the map. This way you can destroy an instance, create another one and find again the same state. Take a look at the wiki to see an example of architecture using ol-comfy.
You can play with the examples by cloning this repo and running:
npm install
npm run devThe source is transpiled to standard ES modules and published on npm.
# Update the `CHANGES.md` file
# Update the `vite.config.ts` file if you have new example files.
npm run build
npm version patch/minor/major
npm publish
git push --tags origin main
npm run gh-pages