Hacker News
Protomaps: Self-hosting map tiles has gotten cheap and easy
boramalper
|next
[-]
> What is OpenFreeMap?
> OpenFreeMap lets you display custom maps on your website and apps for free.
> Using our public instance is completely free: there are no limits on the number of map views or requests. There’s no registration, no user database, no API keys, and no cookies. We aim to cover the running costs of our public instance through donations.
> What is the tech stack?
> There is no tile server running; only nginx serving a Btrfs image with 300 million hard-linked files. This was my idea; I haven’t read about anyone else doing this in production, but it works really well.
neomantra
|next
|previous
[-]
If you are into this stuff, you can view PMTiles from the CLI with "gloss", or try to drag-and-drop on its web interface [1]. It seems large tiles (>128M) and some raster formats are failing; plus it would be nice to load from URL there. Will fix that...
(AI warning). ntmaps [2] is a Golang library that lets you use different tile providers, deployable in terminal or browser. ntplaygrounds [3] uses that and nt3d and ntactor to make a city simulation. Data is pulled from OpenStreetMap in those.
[1] https://nimbleterminal.com/gloss/app.html [2] https://nimbleterminal.com/ntmaps [3] https://nimbleterminal.com/ntplaygrounds
jamessb
|root
|parent
|next
[-]
The official PMTiles viewer [1, 2, 3] is also pretty good.
[1]: https://pmtiles.io/
cldellow
|root
|parent
|next
|previous
[-]
Cloudflare, generally, is amazing for this, actually. It serves my personal hiking map for about $2/mo, using R2, D1 and Workers.
Building the map itself is free via GitHub Actions.
It's bonkers how the map world has changed over the last 20 years.
kellpossible2
|root
|parent
|previous
[-]
cldellow
|root
|parent
[-]
1. The app is a remix app, workers do server-side rendering, so that a vanilla `curl` shows the actual payload, not just a script tag that loads the app.
2. I'm a great big nerd, so I recently added the ability to post reviews/photos/GPX traces to your AT protocol PDS. The app has a Worker cron job that subscribes to Bluesky's Jetstream for events in its namespace, and indexes these into D1 in order to answer certain API calls like "get traces in this area" or "get reviews for this hike". So the app itself isn't the primary source of truth, a person's PDS (which they control) is. The app just maintains a cache/index that can be rebuilt.
eruci
|next
|previous
[-]
motoroco
|next
|previous
[-]
the fun/hard parts of the project weren't really scale dependent, although downloading source imagery and building the tile pyramids did take literally weeks to run. actually, the hardest part was getting demosaicing right, e.g. making the quilt seamless. filtering out cloudy and smokey/hazy tiles while picking alternatives from the same time of year so groundcover & crops are in a consistent growth stage so you don't end up with checkerboard patterns or cloud silhouettes randomly across your map. and there were other problems that came up more or less just because of how & when the satellite took the images that require exposure correction and more filtering
I also have a pelias index with 170M records for search and self-host valhalla for routing. the open source mapping ecosystem has really impressed me the more I learn with each project
maelito
|root
|parent
[-]
motoroco
|root
|parent
[-]
nchmy
|next
|previous
[-]
After evaluating maplibre vs the somewhat-abandonned protomaps-leaflet library, I decided to go with the latter as I don't really need the fancy 3d gpu and custom layers functionality of maplibre. Plus leaflet is releasing a long-awaited v2 right now.
joshstrange
|next
|previous
[-]
Dirt cheap to run, theme-able, easy to use.
perks_12
|next
|previous
[-]
maelito
|next
|previous
[-]
Hence Protomaps. Hosting costs almost nothing.
The main problem though is that once you host your tiles, why not put what you want inside ?
Tune Tilemaker's processing.lua to your envy. Spend hours designing maps and building a Typescrpt dynamic Maplibre style.
maelito
|next
|previous
[-]
doodlebugging
|next
|previous
[-]
p - proxy - tp8ez dot bunny dot run
so I closed that window.
What else you got?
bcye
|root
|parent
[-]
doodlebugging
|root
|parent
[-]
Thanks for the explanation.
Protomaps sounds interesting.
pluto_modadic
|previous
[-]
perrygeo
|root
|parent
|next
[-]
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.