Skip to content

mapstyle

A whole OpenStreetMap map in one offline HTML page: the roads for driving, walking and cycling over a full base map, from one duckOSM database.

Monaco drawn by mapstyle: streets, paths, buildings, parks, the port and the sea

Open the live map Get started

pip install mapstyle "duckosm @ git+https://github.com/Khoshkhah/duckOSM"

curl -LO https://download.geofabrik.de/europe/monaco-latest.osm.pbf
duckosm build --pbf monaco-latest.osm.pbf -o monaco.duckdb \
              -m driving -m walking -m cycling
mapstyle monaco.duckdb          # -> monaco_all.html: one file, opens offline

What you get

  • Every travel mode


    One map for driving, walking and cycling, or one network brought to the front: the roads for cars fade, the paths stand out.

    Travel modes & path styles

  • A full base map


    The sea, land use, water, buildings, railways, parking, transit and road furniture, all from the same database. No tile server, no API key.

    The base map

  • Roads drawn right


    Bridges over, tunnels under only where they really pass under a road, raised walkways, footways and crossings never over a street (the zebra marking is), two-way roads as two lanes.

    How roads are drawn

  • Route planner (demo)


    A demo of a page built on mapstyle: drag a start and an end, see duckOSM's route.

    Route planner

  • Dashboard


    Filter by mode, road class and layer, colour by mode, and read every road and feature you click in a side panel.

    Dashboard

  • A JavaScript API


    Every page is a roadstyle page: filter, colour and query roads and layers from your own code, with 3D and vector tiles built in.

    JavaScript API

How it fits together

Project Its part
duckOSM turns an OpenStreetMap extract into one DuckDB file: the driving, walking and cycling networks, plus the base-map layers (features.*, the sea included)
mapstyle reads that file (with duckdb, nothing else) and styles all of it as one map
roadstyle draws the page: MapLibre GL, the road styling, and the JavaScript API

The result is a single HTML file you can open from disk, email, or put on any web server.