From e6819b6dd3ae5d9961e592aa8369eb54ba96721b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Vigh?= Date: Sat, 8 May 2021 18:20:54 +0200 Subject: [PATCH 1/2] added leaflet subdomains to the environment variables, which are used now for initializing a leaflet map --- .env.example | 1 + public/static/js/map_editor.js | 2 +- views/admin/map_editor.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 512f904..841b410 100644 --- a/.env.example +++ b/.env.example @@ -7,6 +7,7 @@ DB_NAME=mapguesser GOOGLE_MAPS_SERVER_API_KEY=your_google_maps_server_api_key GOOGLE_MAPS_JS_API_KEY=your_google_maps_js_api_key LEAFLET_TILESERVER_URL=a_leaflet_compatible_tileserver_url +LEAFLET_TILESERVER_SUBDOMAINS=list_of_subdomains_for_the_tileserver_without_separators LEAFLET_TILESERVER_ATTRIBUTION=attribution_to_be_shown_for_tiles STATIC_ROOT=/static MAIL_FROM=mapguesser@mapguesser-dev.ch diff --git a/public/static/js/map_editor.js b/public/static/js/map_editor.js index 9e3a70c..32e7f48 100644 --- a/public/static/js/map_editor.js +++ b/public/static/js/map_editor.js @@ -382,7 +382,7 @@ L.tileLayer(tileUrl, { attribution: tileAttribution, - subdomains: '1234', + subdomains: tileSubdomains, ppi: highResData.ppi, tileSize: highResData.tileSize, zoomOffset: highResData.zoomOffset, diff --git a/views/admin/map_editor.php b/views/admin/map_editor.php index 4b6da75..cd69871 100644 --- a/views/admin/map_editor.php +++ b/views/admin/map_editor.php @@ -94,6 +94,7 @@ @section(pageScript)