Fix various errors in gridmap (in context of removal of old maps)

pull/2749/head
phl0 2023-11-30 10:37:57 +01:00
rodzic 79bb03ac92
commit 476a50706d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
4 zmienionych plików z 21 dodań i 13 usunięć

Wyświetl plik

@ -13,6 +13,7 @@ class Activated_gridmap extends CI_Controller {
$this->load->model('activated_gridmap_model'); $this->load->model('activated_gridmap_model');
$this->load->model('stations'); $this->load->model('stations');
$data['visitor'] = false;
$data['homegrid'] = explode(',', $this->stations->find_gridsquare()); $data['homegrid'] = explode(',', $this->stations->find_gridsquare());
$data['modes'] = $this->activated_gridmap_model->get_worked_modes(); $data['modes'] = $this->activated_gridmap_model->get_worked_modes();

Wyświetl plik

@ -439,7 +439,6 @@ class Visitor extends CI_Controller {
$data['grid_4char'] = js_array($array_grid_4char); $data['grid_4char'] = js_array($array_grid_4char);
$data['grid_6char'] = js_array($array_grid_6char); $data['grid_6char'] = js_array($array_grid_6char);
$data['homegrid'] = 'JO31OL';
$data['layer'] = $this->optionslib->get_option('option_map_tile_server'); $data['layer'] = $this->optionslib->get_option('option_map_tile_server');
$data['attribution'] = $this->optionslib->get_option('option_map_tile_server_copyright'); $data['attribution'] = $this->optionslib->get_option('option_map_tile_server_copyright');

Wyświetl plik

@ -124,19 +124,25 @@
<div id="gridsquare_map" style="width: 100%; height: 800px"></div> <div id="gridsquare_map" style="width: 100%; height: 800px"></div>
</div> </div>
<div class="coordinates d-flex"> <div class="coordinates d-flex">
<div class="cohidden"><?php echo lang('gen_hamradio_latitude')?>: </div> <div class="cohidden"><?php echo lang('gen_hamradio_latitude')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="latDeg"></div> <div class="cohidden col-auto text-success fw-bold" id="latDeg"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_longitude')?>: </div> <div class="cohidden"><?php echo lang('gen_hamradio_longitude')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="lngDeg"></div> <div class="cohidden col-auto text-success fw-bold" id="lngDeg"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_gridsquare')?>: </div> <div class="cohidden"><?php echo lang('gen_hamradio_gridsquare')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="locator"></div> <div class="cohidden col-auto text-success fw-bold" id="locator"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_distance')?>: </div> <div class="cohidden"><?php echo lang('gen_hamradio_distance')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="distance"></div> <div class="cohidden col-auto text-success fw-bold" id="distance"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_bearing')?>: </div> <div class="cohidden"><?php echo lang('gen_hamradio_bearing')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="bearing"></div> <div class="cohidden col-auto text-success fw-bold" id="bearing"></div>
</div> </div>
<script>var gridsquaremap = true; <script>
var gridsquaremap = true;
var type = "activated"; var type = "activated";
<?php if ($visitor == true) { ?>
var visitor = true;
<?php } else { ?>
var visitor = false;
<?php } ?>
<?php <?php
echo 'var jslayer ="' . $layer .'";'; echo 'var jslayer ="' . $layer .'";';
echo "var jsattribution ='" . $attribution . "';"; echo "var jsattribution ='" . $attribution . "';";

Wyświetl plik

@ -126,15 +126,15 @@
<div id="gridsquare_map" style="width: 100%; height: 800px"></div> <div id="gridsquare_map" style="width: 100%; height: 800px"></div>
</div> </div>
<div class="coordinates d-flex"> <div class="coordinates d-flex">
<div class="cohidden"><?php echo lang('gen_hamradio_latitude')?>: </div> <div class="cohidden"><?php echo lang('gen_hamradio_latitude')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="latDeg"></div> <div class="cohidden col-auto text-success fw-bold" id="latDeg"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_longitude')?>: </div> <div class="cohidden"><?php echo lang('gen_hamradio_longitude')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="lngDeg"></div> <div class="cohidden col-auto text-success fw-bold" id="lngDeg"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_gridsquare')?>: </div> <div class="cohidden"><?php echo lang('gen_hamradio_gridsquare')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="locator"></div> <div class="cohidden col-auto text-success fw-bold" id="locator"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_distance')?>: </div> <div class="cohidden"><?php echo lang('gen_hamradio_distance')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="distance"></div> <div class="cohidden col-auto text-success fw-bold" id="distance"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_bearing')?>: </div> <div class="cohidden"><?php echo lang('gen_hamradio_bearing')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="bearing"></div> <div class="cohidden col-auto text-success fw-bold" id="bearing"></div>
</div> </div>
<script> <script>
@ -148,7 +148,9 @@ var visitor = false;
<?php <?php
echo "var jslayer = \"" . $layer ."\";\n"; echo "var jslayer = \"" . $layer ."\";\n";
echo "var jsattribution ='" . $attribution . "';"; echo "var jsattribution ='" . $attribution . "';";
echo "var homegrid = \"" . strtoupper($homegrid[0]) . "\";\n"; if ($visitor == false) {
echo "var homegrid = \"" . strtoupper($homegrid[0]) . "\";\n";
}
echo "var gridsquares_gridsquares = \"" . $gridsquares_gridsquares . "\";\n"; echo "var gridsquares_gridsquares = \"" . $gridsquares_gridsquares . "\";\n";
echo "var gridsquares_gridsquares_confirmed = \"" . $gridsquares_gridsquares_confirmed . "\";\n"; echo "var gridsquares_gridsquares_confirmed = \"" . $gridsquares_gridsquares_confirmed . "\";\n";