I'm a little annoyed for the fact that the map shows South America and avoids showing the Argentina label because it overflows but doesn't give a fuck about Chile and its 2mm of width.
It uses PMTiles… Range requests are only supported on S3 directly. If you want to use a custom domain, edge level caching etc. you‘ll need to use a CDN like CloudFront
Yeah Protonmaps is awesome, I’ve been very happy with them. Dirt cheap and simple. After getting hit with a couple hundred dollars (yes, not much, but it was a side project) with Google Maps I went looking for alternatives and found protonmaps, I haven’t looked back.
The architecture diagram in the repo is a little overwhelming for a Friday night — conceivably you could just toss a public pmtiles file on s3, and access it directly from the maplibre front-end, right? (As long as you’re not worried about someone coming along and downloading your whole tileset)
The architecture mostly is just putting things in S3 and serving them on a CDN. The diagram just goes into detail because little things like permissions and response header settings exist as separate but related "Policy" resources at the AWS level.
The only thing other than S3/CloudFront there is a lambda function endpoint that determines which tiles to serve.
I see how this adds some value via the set up scripts. However, I do wish the author more clearly identified that this work, including much of the wording of the blog post, is largely borrowed from protonmaps/pmtiles docs.
That’s not entirely correct. Yes, this project wraps Protomaps/PMTiles and describes the process and delivers Infrastructure as Code to deploy the whole stack to AWS, which the Protomaps website and code repos don’t deliver.
Not sure what you mean with borrowed from the docs, as I have a hard time to imagine a way of delivering the current project without using or referencing specific things from the libraries/projects used.
I’ve done something similar with tippecanoe and mapshaper from gis files. That allowed me to use mapbox.js with my own hosted custom maps, as flat files. Very fast but still needed to run a server (tileserver-gl-light). This could negate that, very cool!
It does. Recently migrated a project from a tile server to PMTiles, and now tile generation is just part of CI in the kart repo where the shapefiles are edited. CI passes and uploads the pmtiles file to the web server. Completely eliminated the tile server altogether.
> Please be aware that this will run for several hours depending on your machine, and will generate a PMTiles file around 45GB. This file will take some time to upload to S3 in the next step as well.
Spin up a tiny EC2 instance with 100 GB volume if you want this to go much faster, assuming your upload is as bad as mine is.