repo and slides:
github.com/bdon/protomaps-workshop-sotmus24
Protomaps is a solution for interactive web maps, 100% open source and under your own control.
What is the status quo?
by Dan Austin, Helmut Ziewers, Matt Hampel
by Maryanne Watcher
by Hanbyul Jo
by NPR
Not big? use GeoJSON
Not static? use PostGIS.
Fork this repo!
github.com/bdon/protomaps-workshop-sotmus24
osmium tags-filter -o paths.osm.pbf utah.osm.pbf w/highway=path
osmium export paths.osm.pbf -f geojsonseq | tippecanoe -o utah_highway_path.pmtiles -f
let protocol = new pmtiles.Protocol();
maplibregl.addProtocol("pmtiles",protocol.tile);
sources: {
trails: {
type: "vector",
url: "pmtiles://../utah_highway_path.pmtiles",
attribution: '© OpenStreetMap contributors'
}
},
What's our map missing?
I pre-packaged a PMTiles of Joerd from zooms 0-12
https://r2-public.protomaps.com/protomaps-sample-datasets/terrarium-z12.pmtiles
try using
pmtiles show
pmtiles extract \ --bbox=-114.111749,36.937896,-108.97866,42.098695 \ https://r2-public.protomaps.com/protomaps-sample-datasets/terrarium-z12.pmtiles \ utah_terrarium.pmtiles
terrain: {
type: "raster-dem",
url: "pmtiles://../utah_terrarium.pmtiles",
attribution: '© Joerd',
encoding: 'terrarium'
}
What else is missing?
Daily build incorporates fresh OSM data
pmtiles show https://build.protomaps.com/20240607.pmtiles
pmtiles extract \ --bbox=-114.111749,36.937896,-108.97866,42.098695 \ https://build.protomaps.com/20240607.pmtiles \ utah_basemap.pmtiles
basemap: {
type: "vector",
url: "pmtiles://../utah_basemap.pmtiles",
attribution: '© OpenStreetMap contributors'
}
const baselayers = protomaps_themes_base.default("basemap", "light");
...
sprite: "https://protomaps.github.io/basemaps-assets/sprites/v3/light",
...
layers: [
...baselayers,
...