// the find
w3cj/openfreemap-examples
Examples for react, vue, svelte and vanilla js using OpenFreeMap.org tiles with MapLibre GL JS libraries.
A collection of minimal starter examples showing how to wire up MapLibre GL JS with OpenFreeMap's free tile hosting, covering React, Vue, Svelte, vanilla JS, and Leaflet. It's aimed at developers who want a working map without paying for Mapbox or Maptiler tiles and just need to see the boilerplate for their framework of choice.
Each example is self-contained with its own package.json and pnpm lockfile, so you can clone one subfolder and run it without wading through a monorepo setup. The dark style JSON is bundled locally rather than fetched from a third-party CDN, which avoids the usual surprise when external style URLs change. Including both a MapLibre and a Leaflet vanilla example is useful — Leaflet is still in a lot of legacy codebases and the adapter story isn't obvious. The framework wrappers chosen (vis.gl/react-maplibre, svelte-maplibre) are the maintained community picks, not dead forks.
Last pushed October 2024 and the framework wrappers move fast — dependency drift is already visible and these examples will silently break as peer deps shift. There's no monorepo tooling (no workspace root, no shared scripts), so updating the dark.json style or the ip-api call across five copies is manual copy-paste. The IP geolocation approach (ip-api.com over HTTP) leaks user IP to a third party with no fallback if the service is down or rate-limited — not a great default even for examples. No tests, no CI, no deployed demo links in the README, so you can't tell if the examples actually work without running them yourself.