[Gridsquare map] marker on click now only active in gridsquare map (not visitor or activator map)

这个提交包含在:
Andreas 2023-06-14 08:57:20 +02:00
父节点 1171a9f1f5
当前提交 f400629a10
共有 2 个文件被更改,包括 6 次插入4 次删除

查看文件

@ -1388,7 +1388,7 @@ $(document).ready(function(){
<?php } ?> <?php } ?>
<?php if ($this->uri->segment(1) == "gridsquares" && !empty($this->uri->segment(2))) { ?> <?php if ($this->uri->segment(1) == "gridsquares" && !empty($this->uri->segment(2))) { ?>
<script>var gridsquaremap = true;</script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.MaidenheadColoured.js"></script> <script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.MaidenheadColoured.js"></script>
<script> <script>

查看文件

@ -128,10 +128,12 @@ L.Maidenhead = L.LayerGroup.extend({
var marker = L.marker([lat,lon], {icon: myIcon}, clickable=false); var marker = L.marker([lat,lon], {icon: myIcon}, clickable=false);
if (zoom == 4 || zoom == 3) { if (zoom == 4 || zoom == 3) {
marker.bindTooltip(locator); marker.bindTooltip(locator);
if (typeof variable !== 'undefined' && gridsquaremap == true) {
marker.on('click', function(event) { marker.on('click', function(event) {
spawnGridsquareModal(locator); spawnGridsquareModal(locator);
}); });
} }
}
return marker; return marker;
}, },