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

pull/2200/head
Andreas 2023-06-14 08:57:20 +02:00
rodzic 1171a9f1f5
commit f400629a10
2 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -1388,7 +1388,7 @@ $(document).ready(function(){
<?php } ?>
<?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>

Wyświetl plik

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