logoalt Hacker News

pluto_modadic • today at 9:16 PM • 4 replies • view on HN

okay, but what clients work with this approach?


Replies

perrygeo • today at 9:25 PM

You can use the pmtiles:// protocol in Maplibre GL, requires protomaps.js and a few lines of setup [1]

My experience with it is ... ok. It works. But going directly to cloud storage (s3 in my case) is unpredictable latency and neither the browser nor most servers really cache HTTP range requests granularly, so every tile is another high-latency round trip. Not worth it - I ended up putting Martin tile server in front of it.

I assume someone could write a protomaps adapter in WASM with some smart caching? Until then, Standard GET requests are just easier to cache and perform much better in practice. The downside being you have to run a server or statically generate files.

[1]- https://docs.protomaps.com/pmtiles/maplibre

➕ show 2 replies
cr125rider • today at 9:26 PM

Protomaps, pmtiles, are actually pretty ubiquitous. Even has a GDAL driver https://gdal.org/en/stable/drivers/vector/pmtiles.html

bcye • today at 9:21 PM

There is an npm library that integrates the format into MapLibre (fork of Mapbox) and Leaflet.

pstuart • today at 9:25 PM

A quick search showed that this should work with HTTP range requests: https://maplibre.org/