Skip to content

Commit

Permalink
Merge pull request #3167 from thecocohead/dev
Browse files Browse the repository at this point in the history
Add station flag to map
  • Loading branch information
magicbug authored Jul 11, 2024
2 parents 48c0c04 + 94fd2d2 commit 412b56f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions application/models/Stations.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,16 @@ public function get_station_array_for_map() {
$_jsonresult = array();
list($station_lat, $station_lng) = array(0,0);
$station_active = $this->profile($this->find_active())->row();
if (!empty($station_active)) { list($station_lat, $station_lng) = $this->qra->qra2latlong($station_active->station_gridsquare); }
if (($station_lat!=0)&&($station_lng!=0)) { $_jsonresult = array('lat'=>$station_lat,'lng'=>$station_lng,'html'=>$station_active->station_gridsquare,'label'=>$station_active->station_profile_name,'icon'=>'stationIcon'); }

$CI = &get_instance();
$CI->load->library('DxccFlag');
$flag = "";
if (!empty($station_active)) {
$flag = strtolower($CI->dxccflag->getISO($station_active->station_dxcc));
$flag = '<span class="fi fi-' . $flag .'"></span> ';
list($station_lat, $station_lng) = $this->qra->qra2latlong($station_active->station_gridsquare);
}
if (($station_lat!=0)&&($station_lng!=0)) { $_jsonresult = array('lat'=>$station_lat,'lng'=>$station_lng,'html'=>$station_active->station_gridsquare,'label'=>$station_active->station_profile_name,'icon'=>'stationIcon','flag'=>$flag); }
return (count($_jsonresult)>0)?(array('station'=>$_jsonresult)):array();
}
}
Expand Down

0 comments on commit 412b56f

Please sign in to comment.