From a0d1e8778c0924d2fc7fa191d106d369b19cf983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Thu, 11 Jun 2020 00:14:30 +0200 Subject: [PATCH] MAPG-126 add configurable attribution for Leaflet maps --- .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 e27e8dd..8dc5e72 100644 --- a/.env.example +++ b/.env.example @@ -6,3 +6,4 @@ 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_ATTRIBUTION=attribution_to_be_shown_for_tiles diff --git a/public/static/js/map_editor.js b/public/static/js/map_editor.js index ef1108c..c426eeb 100644 --- a/public/static/js/map_editor.js +++ b/public/static/js/map_editor.js @@ -351,7 +351,6 @@ }; MapEditor.map = L.map('map', { - attributionControl: false, zoomControl: false }); @@ -371,6 +370,7 @@ var highResData = Util.getHighResData(); L.tileLayer(tileUrl, { + attribution: tileAttribution, subdomains: '1234', ppi: highResData.ppi, tileSize: highResData.tileSize, diff --git a/views/admin/map_editor.php b/views/admin/map_editor.php index 7f65a5f..7fc7707 100644 --- a/views/admin/map_editor.php +++ b/views/admin/map_editor.php @@ -62,6 +62,7 @@