kopia lustrzana https://github.com/magicbug/Cloudlog
Use station location as base for map
rodzic
d559937459
commit
8409dd03b0
|
@ -678,7 +678,24 @@ $(document).on('keypress',function(e) {
|
|||
|
||||
<script>
|
||||
var markers = L.layerGroup();
|
||||
var mymap = L.map('qsomap').setView([51.505, -0.09], 13);
|
||||
var pos = [51.505, -0.09];
|
||||
var mymap = L.map('qsomap').setView(pos, 12);
|
||||
<?php
|
||||
$this->load->model('stations');
|
||||
$active_station_id = $this->stations->find_active();
|
||||
$station_profile = $this->stations->profile($active_station_id);
|
||||
$active_station_info = $station_profile->row();
|
||||
if ($active_station_info->station_gridsquare != "") { ?>
|
||||
$.getJSON('logbook/qralatlngjson/<?php echo $active_station_info->station_gridsquare; ?>', function(result) {
|
||||
mymap.panTo([result[0], result[1]]);
|
||||
pos = result;
|
||||
})
|
||||
<?php } else if (null !== $this->config->item('locator')) { ?>
|
||||
$.getJSON('logbook/qralatlngjson/<?php echo $this->config->item('locator'); ?>', function(result) {
|
||||
mymap.panTo([result[0], result[1]]);
|
||||
pos = result;
|
||||
})
|
||||
<?php } ?>
|
||||
|
||||
L.tileLayer('<?php echo $this->optionslib->get_option('map_tile_server');?>', {
|
||||
maxZoom: 18,
|
||||
|
|
|
@ -275,7 +275,7 @@ function reset_fields() {
|
|||
$('#qso-last-table').show();
|
||||
$('#partial_view').hide();
|
||||
|
||||
mymap.setView([51.505, -0.09], 13);
|
||||
mymap.setView(pos, 12);
|
||||
mymap.removeLayer(markers);
|
||||
$('.callsign-suggest').hide();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue