Skip to content

Commit

Permalink
[Gridsquare Map] Shows 2,4,6 grids
Browse files Browse the repository at this point in the history
Fixes #3136
  • Loading branch information
magicbug committed Jun 19, 2024
1 parent df6538a commit ccb9f59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
21 changes: 7 additions & 14 deletions application/controllers/Gridmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ public function getGridsjs() {
foreach ($query->result() as $row) {
$grid_2char_confirmed = strtoupper(substr($row->GRID_SQUARES,0,2));
$grid_4char_confirmed = strtoupper(substr($row->GRID_SQUARES,0,4));
if ($this->config->item('map_6digit_grids')) {
$grid_6char_confirmed = strtoupper(substr($row->GRID_SQUARES,0,6));
}
$grid_6char_confirmed = strtoupper(substr($row->GRID_SQUARES,0,6));

// Check if 2 Char is in array
if(!in_array($grid_2char_confirmed, $array_grid_2char_confirmed)){
Expand All @@ -89,10 +87,8 @@ public function getGridsjs() {
array_push($array_grid_4char_confirmed, $grid_4char_confirmed);
}

if ($this->config->item('map_6digit_grids')) {
if(!in_array($grid_6char_confirmed, $array_grid_6char_confirmed)){
if(!in_array($grid_6char_confirmed, $array_grid_6char_confirmed)){
array_push($array_grid_6char_confirmed, $grid_6char_confirmed);
}
}
}
}
Expand All @@ -104,9 +100,7 @@ public function getGridsjs() {

$grid_two = strtoupper(substr($row->GRID_SQUARES,0,2));
$grid_four = strtoupper(substr($row->GRID_SQUARES,0,4));
if ($this->config->item('map_6digit_grids')) {
$grid_six = strtoupper(substr($row->GRID_SQUARES,0,6));
}
$grid_six = strtoupper(substr($row->GRID_SQUARES,0,6));

// Check if 2 Char is in array
if(!in_array($grid_two, $array_grid_2char)){
Expand All @@ -116,12 +110,11 @@ public function getGridsjs() {
if(!in_array($grid_four, $array_grid_4char)){
array_push($array_grid_4char, $grid_four);
}

if ($this->config->item('map_6digit_grids')) {
if(!in_array($grid_six, $array_grid_6char)){
array_push($array_grid_6char, $grid_six);
}

if(!in_array($grid_six, $array_grid_6char)){
array_push($array_grid_6char, $grid_six);
}

}
}
$query_vucc = $this->gridmap_model->get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat);
Expand Down
1 change: 1 addition & 0 deletions assets/js/sections/gridmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function gridPlot(form, visitor=true) {
sat: $("#sats").val(),
},
success: function (data) {
console.log(data);
$('.cohidden').show();
$(".ld-ext-right-plot").removeClass('running');
$(".ld-ext-right-plot").prop('disabled', false);
Expand Down

0 comments on commit ccb9f59

Please sign in to comment.