The base map¶
Everything that isn't a road comes from the same duckOSM database (its features.*
layers), styled like openstreetmap.org. No tile server, no API key.


The layers¶
In drawing order, bottom first. Each has a row in the LAYERS box, so it can be hidden.
| Layer | From duckOSM | Shows | From zoom |
|---|---|---|---|
ocean |
features.ocean |
the sea | |
landcover |
features.land (+ school, hospital and sports grounds from sites, + the land of the boundary as the kind background) |
parks, grass, forest, residential and industrial land, cemeteries, beaches…; forests, orchards, cemeteries, wetland and scrub get openstreetmap.org's textures | |
water |
features.water_polygons |
lakes, rivers, basins, docks | |
waterways |
features.water_lines |
rivers, streams, canals, ditches | |
paved |
features.paved |
squares, pedestrian areas, piers and quays, helipads, marketplaces (needs duckOSM 0.6.0; an older database has no such table, and the layer is left out) | |
buildings |
features.buildings |
building footprints | 15 |
railways |
features.streets |
rail, tram, light rail, subway, funicular, monorail | |
raceway |
features.streets |
the raceways (Circuit de Monaco) that no mode network holds | |
other_ways |
features.streets |
the other ways that no mode network holds: pieces that touch no network, platforms, lifts | |
parking |
features.sites |
car parks | 15 |
parking_p |
features.sites |
a "P" on each car park | 16 |
bus_station |
features.sites |
bus station footprints | 15 |
platform |
features.sites |
transit platforms | |
traffic_signals |
features.traffic |
traffic lights | 16 |
crossings |
features.traffic |
pedestrian crossings, turned to lie across their road | 16 |
bus_stations |
features.public_transport |
bus stops | 16 |
train_stations |
features.public_transport |
railway stations and halts | 12 |
bicycle |
features.pois |
bicycle rental | 16 |
The roads are drawn between the area layers and the points: the points (icons) are always on top.
The sea¶
OpenStreetMap has no sea polygons, only coastlines. duckOSM fills features.ocean from Overture
Maps' ocean polygons (built from OpenStreetMap's coastline) while it builds the database. A database
built offline, or with options.sea: false, has no sea: the coast's water is then land-coloured.
Choose the layers¶
ms.render_map(db, layers=["buildings", "crossings"]) # just these
ms.render_map(db, layers=False) # roads only
A database built without the base map (duckosm build --no-features) gives the roads only, with a
logged hint.
Clicks, tooltips and kinds¶
Each layer can be clickable (a popup with its name and kind), show a hover tooltip, or neither:
From JavaScript, rsSetInteraction, rsSetKinds (only some kinds of a layer, e.g. just parks) and
roadstyle's rsSetOverlay change them on the page (JavaScript API).
Buildings in 3D¶
The building button under the 2D/3D button, and the "Buildings 3D" row under "buildings" in the Layers box, turn the 3D buildings
on and off. They are off when the page opens. When they are on, each building is a block,
and you see the blocks when you tilt the map (the 2D/3D button or right-drag). The blocks hide the roads behind them.
From JavaScript: rsSetBuildings3D(true).
The height of a building is building:levels x 3 m. If the building has no levels, its height tag (2 m or more).
If it has neither, a height for its kind (house 6 m, apartments 15 m, garage 3 m, and so on), else 9 m.
The values are in features.buildings_3d of styles/osm_carto.yaml.
Change the look¶
The base map is data: styles/layers.yaml says which layers, in which order, with which filter;
styles/osm_carto.yaml says how each looks (colours by kind, outlines, textures, icons, zoom
ranges). See Styles.
The raster maps of roadstyle (CARTO Voyager and Positron, OpenStreetMap, satellite) stay in the base-map switcher (top right) for comparison; they are loaded from the web.