Switch to the pmtiles source
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch pmtiles
# Changes to be committed:
# modified: map/index.html
# modified: map/style.json
# modified: map/viewer.js
#
# Untracked files:
# builds1.html
# mytable.html
# really-slow.html
# spiders2.html
# spiders3.html
# spiders4.html
# spiders5.html
#
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
diff --git c/map/index.html i/map/index.html
index cea5446..b140d7e 100644
--- c/map/index.html
+++ i/map/index.html
@@ -13,15 +13,23 @@
.places-popup pre { white-space: pre-wrap; }
+
+
+
+
+
diff --git c/map/style.json i/map/style.json
index ef5fa2e..9d03f18 100644
--- c/map/style.json
+++ i/map/style.json
@@ -3,7 +3,7 @@
"glyphs": "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf",
"sources": {
"alltheplaces": {
- "url": "https://all-the-places-338115.web.app/services/output",
+ "url": null,
"type": "vector"
},
"raster-tiles": {
diff --git c/map/viewer.js i/map/viewer.js
index cb186f7..7b797db 100644
--- c/map/viewer.js
+++ i/map/viewer.js
@@ -1,10 +1,18 @@
+const protocol = new pmtiles.Protocol();
+maplibregl.addProtocol("pmtiles", protocol.tile);
+
+const { pmtiles_url } = await fetch("https://data.alltheplaces.xyz/runs/latest.json").then(r => r.json());
+const style = await fetch("./style.json").then(r => r.json());
+style.sources.alltheplaces.url = `pmtiles://${pmtiles_url}`;
+
export const map = (window.map = new maplibregl.Map({
container: "map",
- style: "./style.json",
+ style,
center: [0, 0],
zoom: 1,
hash: true,
}));
+
map.addControl(new maplibregl.ScaleControl());
map.dragRotate.disable();
map.touchZoomRotate.disableRotation();