Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Protomaps: OpenStreetMap vector tiles, self-hostable as one static file (protomaps.com)
2 points by homebrewer 4 months ago | hide | past | favorite | 1 comment


By far the best self-hostable map solution I've been able to find.

I've been using it through https://github.com/maplibre/maplibre-gl-js for the last couple of months, and it's been almost as easy/simple as leeching off openstreetmap.org (which isn't really something you're supposed to do).

The server side is just caddy with three lines of config serving a static file that can be prepared using this project's CLI tool. For example, to get all of Iceland:

  $ pmtiles extract \
    https://demo-bucket.protomaps.com/v4.pmtiles is.pmtiles \
    --bbox=-27.9,61.9,-10.7,68.1

  $ du -h is.pmtiles
  252M is.pmtiles
Even though it's a vector map, it renders very smoothly on my 5½-year-old Android phone.

Leaflet also works ok. OpenLayers's vector tile renderer is not very good and won't get you far.

Some commercial organizations repackage OSM data just like this project does, but want upwards of $2k per year for the privilege.

Previous discussion (2023):

https://news.ycombinator.com/item?id=37982621




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: