Open Infrastructure Map, a view of infrastructure data in OpenStreetMap
Allow fetching tiles at zoom levels lower than 2
Russ Garrett3f7c77cd308d
diff --git a/web/public/heatmap.json b/web/public/heatmap.jsonindex 99a5bff..84a781c 100644--- a/web/public/heatmap.json+++ b/web/public/heatmap.json@@ -5,7 +5,6 @@"bounds": [-180, -85.0511, 180, 85.0511],"center": [0, 0, 0],"format": "pbf",- "minzoom": 2,"maxzoom": 17,"tiles": ["https://openinframap.org/heatmap/{z}/{x}/{y}.pbf"],"vector_layers": [{ "id": "power_heatmap_solar", "description": "Solar power heatmap", "fields": {} }]diff --git a/web/public/map.json b/web/public/map.jsonindex a3ac69a..ec10f80 100644--- a/web/public/map.json+++ b/web/public/map.json@@ -5,7 +5,6 @@"bounds": [-180, -85.0511, 180, 85.0511],"center": [0, 0, 0],"format": "pbf",- "minzoom": 2,"maxzoom": 17,"tiles": ["https://openinframap.org/tiles/{z}/{x}/{y}.pbf"],"vector_layers": [diff --git a/web/src/index.ts b/web/src/index.tsindex ea83e12..1fb3dc1 100644--- a/web/src/index.ts+++ b/web/src/index.ts@@ -99,6 +99,8 @@ function init() {url_hash.init({container: 'map',style: map_style,+ // Note: tiles at zoom levels lower than 2 are still required due to how maplibre's globe+ // rendering works.minZoom: 2,maxZoom: 20,center: [12, 26],diff --git a/web/src/style/style.ts b/web/src/style/style.tsindex 7749b3f..61c0c26 100644--- a/web/src/style/style.ts+++ b/web/src/style/style.ts@@ -30,11 +30,11 @@ const style: StyleSpecification = {},openinframap: {type: 'vector',- url: 'https://openinframap.org/map.json'+ url: '/map.json'},solar_heatmap: {type: 'vector',- url: 'https://openinframap.org/heatmap.json'+ url: '/heatmap.json'}},glyphs: '/fonts/{fontstack}/{range}.pbf',