From 4e9b094f89f99b896139c1a5c8d20046846d4d46 Mon Sep 17 00:00:00 2001 From: caprenter Date: Tue, 6 Jun 2023 13:59:32 +0100 Subject: [PATCH] Fixes #63 Updates the mapbox url and map style to work The old style maps have been deprecated Fix from https://docs.mapbox.com/help/troubleshooting/migrate-legacy-static-tiles-api/ Signed-off-by: Chris Croome --- assets/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 6e6aad9..ebe03f6 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -9,12 +9,12 @@ var app = window.app || {}; var mapboxAccessToken = window.mapboxAccessToken || ''; -app.apiUrl = 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=' + mapboxAccessToken; +app.apiUrl = 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=' + mapboxAccessToken; app.tileLayerOptions = { maxZoom: 18, attribution: 'Map data © OpenStreetMap contributors, ' + 'CC-BY-SA, ' + 'Imagery © Mapbox', - id: 'mapbox.streets', + id: 'mapbox/streets-v12', token: window.mapboxAccessToken };