[Gridmap] Added layer from option. Some translation
这个提交包含在:
父节点
db590c969b
当前提交
9074cceec4
共有 3 个文件被更改,包括 22 次插入 和 7 次删除
|
|
@ -15,7 +15,11 @@ class Gridmap extends CI_Controller {
|
||||||
$data['modes'] = $this->gridmap_model->get_worked_modes();
|
$data['modes'] = $this->gridmap_model->get_worked_modes();
|
||||||
$data['bands'] = $this->bands->get_worked_bands();
|
$data['bands'] = $this->bands->get_worked_bands();
|
||||||
$data['sats_available'] = $this->bands->get_worked_sats();
|
$data['sats_available'] = $this->bands->get_worked_sats();
|
||||||
|
|
||||||
|
$data['layer'] = $this->optionslib->get_option('option_map_tile_server');
|
||||||
|
|
||||||
|
$data['attribution'] = $this->optionslib->get_option('option_map_tile_server_copyright');
|
||||||
|
|
||||||
$footerData = [];
|
$footerData = [];
|
||||||
$footerData['scripts'] = [
|
$footerData['scripts'] = [
|
||||||
'assets/js/leaflet/L.MaidenheadColouredGridMap.js',
|
'assets/js/leaflet/L.MaidenheadColouredGridMap.js',
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/*Legend specific*/
|
/*Legend specific*/
|
||||||
.legend {
|
.legend {
|
||||||
|
|
@ -41,7 +43,7 @@
|
||||||
} ?>
|
} ?>
|
||||||
</select>
|
</select>
|
||||||
<?php if (count($sats_available) != 0) { ?>
|
<?php if (count($sats_available) != 0) { ?>
|
||||||
<label class="my-1 mr-2" for="distplot_sats">Satellite</label>
|
<label class="my-1 mr-2" for="distplot_sats"><?php echo lang('general_word_satellite'); ?></label>
|
||||||
<select class="custom-select my-1 mr-sm-2" id="sats" disabled>
|
<select class="custom-select my-1 mr-sm-2" id="sats" disabled>
|
||||||
<option value="All">All</option>
|
<option value="All">All</option>
|
||||||
<?php foreach($sats_available as $sat) {
|
<?php foreach($sats_available as $sat) {
|
||||||
|
|
@ -51,7 +53,7 @@
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input id="sats" type="hidden" value="All"></input>
|
<input id="sats" type="hidden" value="All"></input>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<label class="my-1 mr-2" for="mode">Mode selection</label>
|
<label class="my-1 mr-2" for="mode"><?php echo lang('gen_hamradio_mode'); ?></label>
|
||||||
<select class="custom-select my-1 mr-sm-2" id="mode">
|
<select class="custom-select my-1 mr-sm-2" id="mode">
|
||||||
<option value="All">All</option>
|
<option value="All">All</option>
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -78,7 +80,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button id="plot" type="button" name="plot" class="btn btn-primary" onclick="gridPlot(this.form)">Plot</button>
|
<button id="plot" type="button" name="plot" class="btn btn-primary ld-ext-right" onclick="gridPlot(this.form)">Plot<div class="ld ld-ring ld-spin"></div></button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php if($this->session->flashdata('message')) { ?>
|
<?php if($this->session->flashdata('message')) { ?>
|
||||||
|
|
@ -92,4 +94,9 @@
|
||||||
<div id="gridmapcontainer">
|
<div id="gridmapcontainer">
|
||||||
<div id="gridsquare_map" style="width: 100%; height: 800px"></div>
|
<div id="gridsquare_map" style="width: 100%; height: 800px"></div>
|
||||||
</div>
|
</div>
|
||||||
<script>var gridsquaremap = true;</script>
|
<script>var gridsquaremap = true;
|
||||||
|
<?php
|
||||||
|
echo 'var jslayer ="' . $layer .'";';
|
||||||
|
echo "var jsattribution ='" . $attribution . "';";
|
||||||
|
?>
|
||||||
|
</script>
|
||||||
|
|
@ -16,6 +16,8 @@ var grid_four_confirmed = '';
|
||||||
var grid_six_confirmed = '';
|
var grid_six_confirmed = '';
|
||||||
|
|
||||||
function gridPlot(form) {
|
function gridPlot(form) {
|
||||||
|
$(".ld-ext-right").addClass('running');
|
||||||
|
$(".ld-ext-right").prop('disabled', true);
|
||||||
$('#plot').prop("disabled", true);
|
$('#plot').prop("disabled", true);
|
||||||
// If map is already initialized
|
// If map is already initialized
|
||||||
var container = L.DomUtil.get('gridsquare_map');
|
var container = L.DomUtil.get('gridsquare_map');
|
||||||
|
|
@ -38,6 +40,8 @@ function gridPlot(form) {
|
||||||
sat: $("#sats").val(),
|
sat: $("#sats").val(),
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
$(".ld-ext-right").removeClass('running');
|
||||||
|
$(".ld-ext-right").prop('disabled', false);
|
||||||
$('#plot').prop("disabled", false);
|
$('#plot').prop("disabled", false);
|
||||||
grid_two = data.grid_2char;
|
grid_two = data.grid_2char;
|
||||||
grid_four = data.grid_4char;
|
grid_four = data.grid_4char;
|
||||||
|
|
@ -45,9 +49,9 @@ function gridPlot(form) {
|
||||||
grid_two_confirmed = data.grid_2char_confirmed;
|
grid_two_confirmed = data.grid_2char_confirmed;
|
||||||
grid_four_confirmed = data.grid_4char_confirmed;
|
grid_four_confirmed = data.grid_4char_confirmed;
|
||||||
grid_six_confirmed = data.grid_6char_confirmed;
|
grid_six_confirmed = data.grid_6char_confirmed;
|
||||||
var layer = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
var layer = L.tileLayer(jslayer, {
|
||||||
maxZoom: 9,
|
maxZoom: 9,
|
||||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a>',
|
attribution: jsattribution,
|
||||||
id: 'mapbox.streets'
|
id: 'mapbox.streets'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用