Same idea as the generative-art tiles demo, with real data: tinySQL, compiled to WebAssembly, holds one tiles table and every vector tile MapLibre GL requests is the result of one query, run in this tab through a custom tinysql:// protocol:
Nothing is preloaded: the snapshot below is just a tiles table sitting in memory, and every one of its rows is only turned into a rendered tile the moment MapLibre actually asks for it. Because that query runs in-process, it resolves in well under a millisecond — too fast to notice on its own — so watch for the flash: every tile just fetched briefly lights up teal (found and drawn) or red (queried, nothing there) right on the map, then fades. Pan or zoom to a fresh area and you'll see it light up tile by tile, one SELECT per square; pan back to somewhere already decoded and nothing flashes, because no new query ran — that's MapLibre's own client-side tile cache, not tinySQL's.
The tileset itself is Landkreis Dingolfing-Landau, extracted monthly from Geofabrik's niederbayern-latest.osm.pbf by a GitHub Actions job (osmium-tool clips the region, tippecanoe builds the vector tiles), then imported through tinySQL's real ImportMBTiles — see build-bavaria-tiles.sh and cmd/mbtilesregion.
Click anywhere on the map. This runs TILE_ZXY, TILE_QUADKEY, TILE_BBOX and TILE_PARENT for that point at the current zoom, checks whether a tile is actually stored there, and outlines it in teal. It also lists the real OSM tags of whatever feature sits under the pixel you clicked.
Every layer below is filtered live from the same osm vector tiles by one OSM tag (["has","building"], etc.) — toggle them to see the tileset feature by feature.
A real, live SQL query — GEO_BUFFER, GEO_POLYGON_AREA, and a window-function classifier — run against a small towns table (real population figures, from each municipality's German Wikipedia infobox), not client-side JavaScript math. Each town's colored region is a uniform 3 km buffer circle standing in for a real municipal boundary polygon, since this tileset carries per-OSM-element data, not administrative boundaries. Inspired by a similar real address-density choropleth.
The vector source's minzoom/maxzoom and the buttons below come from this tileset's own tiles_metadata row (tippecanoe's -zg picks it from the actual data density), not a guessed constant.
A real GROUP BY aggregate over the tiles table, one bar per zoom level:
Loading…
A few real municipalities inside Landkreis Dingolfing-Landau, as a starting point for exploring the tileset.