Re:Show HN: OSM – self host the entire planet in ~30 minutes
by xrd on Monday August 12, 2024 @09:19AM
(#41224062)
Does anyone know if there is a way to host just a few of the tiles in a static way? For example, if I wanted to build a web page which just shows a map at zoom level 6 for a lat/lng point, and then go to zoom level 13. That would require a tiny subset of tiles; is there a simple way to add the tiles plus the JS code in a static way so no external downloads were necessary?
[ Parent
| on HN ]
Re:Show HN: OSM – self host the entire planet in ~30 minutes
by l72 on Monday August 12, 2024 @11:18AM
(#41225433)
I've used maptiler to do this. You can give it a boundary and zoom levels, along with a theme, and generate prerendered tiles that you can then server just using http. This has worked well with leaflet.
Re:Show HN: OSM – self host the entire planet in ~30 minutes
by Raphaellll on Monday August 12, 2024 @09:31AM
(#41224169)
You can simply pre-render them and store the png tiles in a folder. The folder structure and naming has to be such that e.g. leaflet understands it. Did this for a research demo here: https://map2seq.schumann.pub/nllni/demo/
Re:Show HN: OSM – self host the entire planet in ~30 minutes
by orblivion on Monday August 12, 2024 @09:46AM
(#41224317)
Is there actually a simple way to pre-render? AFAIK it's a lot of work and learning at least if you're coming from scratch.
Re:Show HN: OSM – self host the entire planet in ~30 minutes
by wiredfool on Monday August 12, 2024 @11:30AM
(#41225571)
QGIS can make a tile pyramid of the current map/project at a specific set of bounds.
Re:Show HN: OSM – self host the entire planet in ~30 minutes
by jonah on Monday August 12, 2024 @01:54PM
(#41227364)
I've used TileMill to create tiles for a specific layer of data for a specific area. (Fire evacuation zones for a county.)
Re:Show HN: OSM – self host the entire planet in ~30 minutes
by brennopost on Monday August 12, 2024 @09:41AM
(#41224265)
I had success with Protomaps (https://protomaps.com/).
Re:Show HN: OSM – self host the entire planet in ~30 minutes
by orblivion on Monday August 12, 2024 @09:45AM
(#41224308)
Look at https://protomaps.com/ - You can have a single file in a that represents the vector data for a region at multiple zoom levels. There used to be a really nice UI where you could just select a region. They've changed things around a bit since then so I'm not sure how it works now.
Re:Show HN: OSM – self host the entire planet in ~30 minutes
by bdon on Monday August 12, 2024 @10:31AM
(#41224824)
The replacement for the UI is to use the "pmtiles extract" command line tool:
https://docs.protomaps.com/guide/getting-started#_3-extract-...
Re:Show HN: OSM – self host the entire planet in ~30 minutes
by simonw on Monday August 12, 2024 @01:07PM
(#41226786)
Yes, that’s pretty easy. I did it for Half Moon Bay, California here: https://simonw.github.io/hmb-map/
Code here: https://github.com/simonw/hmb-map