mirror of
https://github.com/TomHodson/tomhodson.github.com.git
synced 2025-06-26 10:01:18 +02:00
3.0 KiB
3.0 KiB
title, layout, excerpt, image, thumbnail, head
title | layout | excerpt | image | thumbnail | head |
---|---|---|---|---|---|
Interactive web maps from a static file | post | PMTiles is a cool new technology to serve interactive vector maps from a static file. | <link rel="prefetch" href="/assets/blog/pmtiles/light.json" as="fetch"> <link rel="stylesheet" href="/assets/css/maplibre-gl.css"> <script src="/assets/js/maplibre-gl.js"></script> <script src="/assets/js/pmtiles.js"></script> |
PMTiles is a new project that lets you serve vector map data from static files through the magic of HTTP range requests.
By following this blog post and throwing in a bit of code from the official examples I've put together this little map below. The vector data is entirely served from a static file on this server. Most interactive web maps work by constantly requesting little map images from an external server at different zoom levels. This approach uses much less data and doesn't require an external server to host all the map data.