Use globally configured tileUrl for CQ map

这个提交包含在:
phl0 2022-10-12 12:49:05 +02:00
父节点 0f3d88fd32
当前提交 df4dcf91eb
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A
共有 2 个文件被更改,包括 5 次插入3 次删除

查看文件

@ -41,7 +41,7 @@ function load_was_map() {
<?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "cq") ) { ?> <?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "cq") ) { ?>
<script src="<?php echo base_url(); ?>assets/js/Polyline.encoded.js"></script> <script src="<?php echo base_url(); ?>assets/js/Polyline.encoded.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/cqmap.js"></script> <script id="cqmapjs" type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/cqmap.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"></script>
<?php } ?> <?php } ?>
<?php if ($this->uri->segment(1) == "statistics") { ?> <?php if ($this->uri->segment(1) == "statistics") { ?>

查看文件

@ -1,3 +1,5 @@
var osmUrl = $('#cqmapjs').attr("tileUrl");
function load_cq_map() { function load_cq_map() {
$('.nav-tabs a[href="#cqmap"]').tab('show'); $('.nav-tabs a[href="#cqmap"]').tab('show');
$.ajax({ $.ajax({
@ -117,7 +119,7 @@ function load_cq_map2(data) {
var map = L.map('cqmap'); var map = L.map('cqmap');
L.tileLayer( L.tileLayer(
'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', osmUrl,
{ {
attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>', attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
maxZoom: 18 maxZoom: 18
@ -182,4 +184,4 @@ function load_cq_map2(data) {
function onClick(e) { function onClick(e) {
var marker = e.target; var marker = e.target;
displayContacts(marker.options.title, $('#band2').val(), $('#mode').val(), 'CQZone'); displayContacts(marker.options.title, $('#band2').val(), $('#mode').val(), 'CQZone');
} }