From df4dcf91eba467c7d86da4152d71e36a6cb25a8a Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 12 Oct 2022 12:49:05 +0200 Subject: [PATCH] Use globally configured tileUrl for CQ map --- application/views/interface_assets/footer.php | 2 +- assets/js/sections/cqmap.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 8ed9fc80..7eb4a965 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -41,7 +41,7 @@ function load_was_map() { uri->segment(1) == "awards" && ($this->uri->segment(2) == "cq") ) { ?> - + uri->segment(1) == "statistics") { ?> diff --git a/assets/js/sections/cqmap.js b/assets/js/sections/cqmap.js index eb2727f9..76964082 100644 --- a/assets/js/sections/cqmap.js +++ b/assets/js/sections/cqmap.js @@ -1,3 +1,5 @@ +var osmUrl = $('#cqmapjs').attr("tileUrl"); + function load_cq_map() { $('.nav-tabs a[href="#cqmap"]').tab('show'); $.ajax({ @@ -117,7 +119,7 @@ function load_cq_map2(data) { var map = L.map('cqmap'); L.tileLayer( - 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', + osmUrl, { attribution: '© OpenStreetMap contributors, CC-BY-SA', maxZoom: 18 @@ -182,4 +184,4 @@ function load_cq_map2(data) { function onClick(e) { var marker = e.target; displayContacts(marker.options.title, $('#band2').val(), $('#mode').val(), 'CQZone'); -} \ No newline at end of file +}