diff --git a/application/controllers/Map.php b/application/controllers/Map.php index 998a8f97..22b7714a 100644 --- a/application/controllers/Map.php +++ b/application/controllers/Map.php @@ -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."
Date/Time: ".$row->COL_TIME_ON."
Band: ".$row->COL_BAND."
Mode: ".$row->COL_MODE."\",\"label\":\"".$row->COL_CALL."\"}"; $count++; } diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 50ef315c..b4df64c0 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -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);