Skip to content

Repository files navigation

last_commit e8f95412c15b4b2f79d73487802e88db0957e87b

Basemap

A self-hosted MapLibre GL style: the OpenMapTiles "OSM" vector style (v3.16) repointed at OpenFreeMap's worldwide vector tiles, with all fonts, sprites and icons served from GitHub Pages.

[!NOTE] > Canonical host is www.ogis.org — never use the org's legacy *.github.io Pages host. It 301-redirects to www.ogis.org, and the redirect hop breaks CORS in browsers, so every published URL points at www.ogis.org directly.

Screenshot

Random basemap render

Note

Regenerated on every build — each ./scripts/build.sh run renders a fresh random map (a random land point anywhere on Earth, quality-gated). Run npm run screenshot:random any time for a new one without the full build.

Overview

Basemap vendors the OpenMapTiles "OSM" vector style (v3.16 — the vector equivalent of the official openstreetmap-carto raster) and repoints it at OpenFreeMap's worldwide, free OpenMapTiles-schema vector tiles. All fonts, sprites and icons are self-hosted on GitHub Pages with open CORS, so anyone can use the style or its assets directly.

The style is built from vendored upstream sources with the same docker tooling OpenMapTiles uses (openmaptiles-tools:7.2), then rewritten to point at the published URLs. See docs/2.build.md for the pipeline.

Live URLs

Asset URL
Demo https://www.ogis.org/basemap/
Style https://www.ogis.org/basemap/style.json
Glyphs https://www.ogis.org/basemap/fonts/{fontstack}/{range}.pbf
Sprite https://www.ogis.org/basemap/sprite
Icons https://www.ogis.org/basemap/icons/{name}.svg
Tiles https://tiles.openfreemap.org/planet

Usage

MapLibre GL JS

const map = new maplibregl.Map({
  container: "map",
  style: "https://www.ogis.org/basemap/style.json",
});

Assets in a custom style

{
  "version": 8,
  "sources": {
    "openmaptiles": {
      "type": "vector",
      "url": "https://tiles.openfreemap.org/planet"
    }
  },
  "glyphs": "https://www.ogis.org/basemap/fonts/{fontstack}/{range}.pbf",
  "sprite": "https://www.ogis.org/basemap/sprite"
}

Remixing

Edit the vendored layer styles under vendor/openmaptiles/layers/*/style.json, then rebuild:

./scripts/build.sh

See docs/3.remixing.md for details.

Screenshots

Render the demo harness to a PNG with Playwright:

npm run screenshot -- --lat 51.5074 --lng -0.1278 --zoom 12 --pitch 45 --rotation 20 --width 1200 --height 630 --out london.png

npm run screenshot:random renders a random land point anywhere on Earth (quality-gated) to screenshot.png. Full flag reference and the harness URL API: docs/4.screenshots.md.

Attribution and Licences

Attribution is baked into the published style: OpenFreeMap · © OpenMapTiles · Data from OpenStreetMap. Keep it when remixing.

Project Component Licence
OpenStreetMap Tile data ODbL-1.0
OpenFreeMap Tile service MIT
OpenMapTiles Style code BSD-3-Clause
OpenMapTiles Design and cartography CC-BY-4.0
openstreetmap-carto Design & icon inspiration CC0-1.0
Open Sans Font Apache-2.0
Noto Sans Font OFL-1.1
MapLibre GL JS Demo renderer BSD-3-Clause

Further Reading

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages