kopia lustrzana https://github.com/magicbug/Cloudlog
[Gridmap] Added layer from option. Some translation
rodzic
db590c969b
commit
9074cceec4
|
@ -15,7 +15,11 @@ class Gridmap extends CI_Controller {
|
|||
$data['modes'] = $this->gridmap_model->get_worked_modes();
|
||||
$data['bands'] = $this->bands->get_worked_bands();
|
||||
$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['scripts'] = [
|
||||
'assets/js/leaflet/L.MaidenheadColouredGridMap.js',
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
<style>
|
||||
/*Legend specific*/
|
||||
.legend {
|
||||
|
@ -41,7 +43,7 @@
|
|||
} ?>
|
||||
</select>
|
||||
<?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>
|
||||
<option value="All">All</option>
|
||||
<?php foreach($sats_available as $sat) {
|
||||
|
@ -51,7 +53,7 @@
|
|||
<?php } else { ?>
|
||||
<input id="sats" type="hidden" value="All"></input>
|
||||
<?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">
|
||||
<option value="All">All</option>
|
||||
<?php
|
||||
|
@ -78,7 +80,7 @@
|
|||
</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>
|
||||
|
||||
<?php if($this->session->flashdata('message')) { ?>
|
||||
|
@ -92,4 +94,9 @@
|
|||
<div id="gridmapcontainer">
|
||||
<div id="gridsquare_map" style="width: 100%; height: 800px"></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 = '';
|
||||
|
||||
function gridPlot(form) {
|
||||
$(".ld-ext-right").addClass('running');
|
||||
$(".ld-ext-right").prop('disabled', true);
|
||||
$('#plot').prop("disabled", true);
|
||||
// If map is already initialized
|
||||
var container = L.DomUtil.get('gridsquare_map');
|
||||
|
@ -38,6 +40,8 @@ function gridPlot(form) {
|
|||
sat: $("#sats").val(),
|
||||
},
|
||||
success: function (data) {
|
||||
$(".ld-ext-right").removeClass('running');
|
||||
$(".ld-ext-right").prop('disabled', false);
|
||||
$('#plot').prop("disabled", false);
|
||||
grid_two = data.grid_2char;
|
||||
grid_four = data.grid_4char;
|
||||
|
@ -45,9 +49,9 @@ function gridPlot(form) {
|
|||
grid_two_confirmed = data.grid_2char_confirmed;
|
||||
grid_four_confirmed = data.grid_4char_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,
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a>',
|
||||
attribution: jsattribution,
|
||||
id: 'mapbox.streets'
|
||||
});
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue