Hacker News new | past | comments | ask | show | jobs | submit login

- Linode Shared CPU 4 GB RAM, 2 CPU Cores, 80GB SSD ($20 / month) - Cloudflare Workers ($5 / month)

I downloaded a tileset file (.mbtiles extension) for the whole planet (latest I can find for free is here [1]). Tileset file is just a SQLite database with a table where each row contains the x/y/z coordinates of a tile and a binary blob containing the corresponding GeoJSON of features as a protobuf (commonly referred to as a vector tile).

You can start tileserver-gl-light[2] (light only serves vector tiles) pointing to the .mbtiles file (Ideally I think you slice the .mbtiles file into individual tiles and put them in something like S3 but it will cost $$$ and time) and it performs remarkably well given that it's serving an 60GB+ .mbtiles file from SSD, not RAM. I have an nginx proxy in front of tileserver-gl-light as I use the Linode for other projects.

I added a rule in Cloudflare to cache any tile request url for 8 days to reduce the load on the origin server. On average about 30-50% of tile requests come from Cloudflare's cache.

On the front end I switched from Mapbox GL JS to Maplibre JS [4]. I switched the Mapbox DEM data for Open Data on AWS [5].

If you need any clarifications, my contact info is in my profile. Hope this helps.

[1] - https://archive.org/details/osm-vector-mbtiles

[2] - https://www.npmjs.com/package/tileserver-gl-light

[3] - https://github.com/maptiler/tileserver-gl/blob/master/README...

[4] - https://maplibre.org/

[5] - https://registry.opendata.aws/terrain-tiles/




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

Search: