mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Map][Custom] Allows filtering custom map by band
This commit is contained in:
@@ -34,6 +34,26 @@ class Map extends CI_Controller {
|
||||
function custom()
|
||||
{
|
||||
|
||||
$this->load->model('dxcc');
|
||||
$this->load->model('modes');
|
||||
|
||||
$data['worked_bands'] = $this->dxcc->get_worked_bands(); // Used in the view for band select
|
||||
$data['modes'] = $this->modes->active(); // Used in the view for mode select
|
||||
|
||||
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
|
||||
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
|
||||
$bands = $data['worked_bands'];
|
||||
}
|
||||
else {
|
||||
$bands[] = $this->input->post('band');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$bands = $data['worked_bands'];
|
||||
}
|
||||
|
||||
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
|
||||
|
||||
// Calculate Lat/Lng from Locator to use on Maps
|
||||
if($this->session->userdata('user_locator')) {
|
||||
$this->load->library('qra');
|
||||
@@ -83,11 +103,12 @@ class Map extends CI_Controller {
|
||||
function map_data_custom() {
|
||||
$start_date = $this->uri->segment(3);
|
||||
$end_date = $this->uri->segment(4);
|
||||
$band = $this->uri->segment(5);
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
$this->load->library('qra');
|
||||
|
||||
$qsos = $this->logbook_model->map_week_qsos(rawurldecode($start_date), rawurldecode($end_date));
|
||||
$qsos = $this->logbook_model->map_custom_qsos(rawurldecode($start_date), rawurldecode($end_date), $band);
|
||||
|
||||
echo "{\"markers\": [";
|
||||
$count = 1;
|
||||
|
||||
Reference in New Issue
Block a user