3 ms·
I just used their pmtiles tool to grab a map of just the area around Half Moon Bay, south of San Francisco. I grabbed the latest macOS Go binary from https://g
by simonw 3y ago
I just used their pmtiles tool to grab a map of just the area around Half Moon Bay, south of San Francisco.
I grabbed the latest macOS Go binary from https://github.com/protomaps/go-pmtiles/releases https://github.com/protomaps/go-pmtiles/releases
I found a rough bounding box using http://bboxfinder.com/#37.373977,-122.593346,37.570977,-122.400055 http://bboxfinder.com/#37.373977,-122.593346,37.570977,-122....
Then I ran this:
pmtiles extract https://build.protomaps.com/20231023.pmtiles hmb.pmtiles \
--bbox=-122.593346,37.373977,-122.400055,37.570977
The result was a 2MB hmb.pmtiles file which, when dragged onto the "drop zone" on https://maps.protomaps.com/ https://maps.protomaps.com/ showed me a detailed zoomable map, with full OpenStreetMap metadata (airport polygons etc) - all the way down to individual building outlines level.
All that in 2MB! I'm really impressed.
My file is here: https://gist.githubusercontent.com/simonw/3c1a5358ca8f782f1393f7ad0304b4bc/raw/193dae5feb25f6e32fca5bb6420b1ea03abfe13b/hmb.pmtiles https://gist.githubusercontent.com/simonw/3c1a5358ca8f782f13...
- oritsnile 3y agoThat's really cool. Cloud be really use full for local businesses. They often embed Google maps, but I feels like having a map from the local are would be sufficient, and cheaper.
- pimlottc 3y agoWouldn’t they need to keep updating this from time to time to stay current? That would likely kill any savings pretty quickly.
- tppiotrowski 3y agoProtomaps generates daily world files I believe [1] but I haven't confirmed that they're used by the download tool yet. In theory you can download the data everyday to pick up updates. [1] https://maps.protomaps.com/builds/ https://maps.protomaps.com/builds/ Edit: re-reading top comment it looks like they're using a daily file so you'd just have to create a cron job
- globular-toast 3y agoIt depends what you use it for. I plan to use it for blog posts where I show the track of where I walked. I actually like that the map won't update. It wouldn't make sense to show me walking across a map of the future, would it? It's a record of the past and the map should be frozen just like the writing.
- pimlottc 3y agoSure, but in GP's context of local businesses, they certainly will want to keep up-to-date with any changes to make sure customers can still find them.
- globular-toast 3y agoYes, absolutely. I think, in that case, a managed tileserver (using PMTiles or otherwise) is probably the best solution.
- simonw 3y agoI turned this into a demo: https://simonw.github.io/hmb-map/ https://simonw.github.io/hmb-map/ and a blog post: https://til.simonwillison.net/gis/pmtiles https://til.simonwillison.net/gis/pmtiles
- globular-toast 3y agoBeat me to it. I was working on this last night but had to sleep before writing it up. I was trying to use parcel as a bundler and was thrown because whatever dev server it uses doesn't seem to support HTTP range requests properly. I was getting "invalid magic number" on the client side.
- botanical 3y agoI realise this isn't tech support but I have no idea why it doesn't work for me. The pmtile file you linked works, but creating my own smaller one doesn't. But the concept is great to get a map for a project
- globular-toast 3y agoI did the same and got a map of Gran Canaria which is 15MB! And it's not like a user is ever going to download the entire file. It's really quite cool and I'm quite excited to put maps on my static site.