Merge pull request #1522 from AndreasK79/custom_map_pin_improvement

[Custom map] Using already logged dxcc to set position when gridsquare is not present
pull/1527/head
Peter Goodhall 2022-07-07 16:20:47 +01:00 zatwierdzone przez GitHub
commit 823cd51ed1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -174,12 +174,11 @@ class Map extends CI_Controller {
echo ",";
}
$result = $this->logbook_model->dxcc_lookup($row->COL_CALL, $row->COL_TIME_ON);
if(isset($result)) {
$lat = $result['lat'];
$lng = $result['long'];
if(isset($row->lat) && isset($row->long)) {
$lat = $row->lat;
$lng = $row->long;
}
echo "{\"lat\":\"".$lat."\",\"lng\":\"".$lng."\", \"html\":\"Callsign: ".$row->COL_CALL."<br />Date/Time: ".$row->COL_TIME_ON."<br />Band: ".$row->COL_BAND."<br />Mode: ".$row->COL_MODE."\",\"label\":\"".$row->COL_CALL."\"}";
$count++;
}

Wyświetl plik

@ -1291,6 +1291,7 @@ class Logbook_model extends CI_Model {
return null;
}
$this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left');
$this->db->where("COL_TIME_ON BETWEEN '".$start."' AND '".$end."'");
$this->db->where_in("station_id", $logbooks_locations_array);