Examples of usage of the MapLibre-Geoman library. MapLibre-Geoman is the most powerful maplibre plugin for drawing and editing geometry layers.
Find the OS version of Maplibre-Geoman here
Check out the full power of MapLibre-Geoman Pro on https://geoman.io/demo/maplibre
This repository is a pnpm workspace. Every example app is a workspace package, sharing a single lockfile and a centralized dependency catalog.
- mise — install and activate the versions declared in
mise.toml(node 24.16.0andpnpm 11.9.0). Corepack is not required. - Node.js ≥ 22.22.3 — required by Angular 22. The workspace uses Node 24.16.0.
Run these from the repository root:
pnpm install # install all apps (one lockfile)
pnpm build # build every example (pnpm -r build)
pnpm check # type-check apps that expose a "check" script
pnpm lint # lint apps that expose a "lint" script
pnpm dev # run every dev server in parallelWork on a single app with a filter, e.g.:
pnpm --filter ./maplibre-geoman-react devA justfile mirrors these commands (just build, just check, etc.).
Shared dependency versions — including the Geoman libraries, maplibre-gl,
mapbox-gl, TypeScript, Vite, and the framework toolchains — live in a single
catalog: in pnpm-workspace.yaml. Each app references
them with "catalog:", so bumping a version once there updates every example.
Bump the Geoman libraries with just update-geoman.
maplibre-glis a peer dependency of@geoman-io/maplibre-geoman-freeand is declared explicitly in each maplibre app, since pnpm's strictnode_modules(unlike npm) does not hoist undeclared peers.
If you have examples that you want to share about your usage of Geoman, please fork this repo and submit a pull request.
| Framework/Template | Demo URL | Code URL | Description |
|---|---|---|---|
| maplibre-geoman-vite | Demo | Code | Vanilla JavaScript implementation using Vite as the build tool |
| maplibre-geoman-vue | Demo | Code | Vue.js integration showcasing reactive map editing capabilities |
| maplibre-geoman-react | Demo | Code | React implementation with hooks and components for map editing |
| maplibre-geoman-preact | Demo | Code | Lightweight Preact alternative to the React implementation |
| maplibre-geoman-nextjs | Demo | Code | Next.js integration with server-side rendering support |
| maplibre-geoman-svelte | Demo | Code | Svelte implementation offering reactive map editing features |
The standalone Pro demos use Geoman Pro 0.13.7. The framework examples use Free 0.10.7. MapLibre apps use GL JS 6.16 and Mapbox apps use GL JS 3.34. Vite bundles the module worker; Next.js and Angular copy the worker and shared module to public assets before builds and development.