mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-22 08:13:41 +00:00
Ability to turn gridsquare map on and off
This commit is contained in:
parent
9fb7051c1a
commit
91dc6dde94
@ -100,6 +100,7 @@ $(document).ready(function(){
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->uri->segment(1) == "logbook" && $this->uri->segment(2) != "view") { ?>
|
||||
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js"></script>
|
||||
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -114,7 +115,12 @@ $(document).ready(function(){
|
||||
var qso_loc = '<?php echo site_url('logbook/qso_map/25/'.$this->uri->segment(3)); ?>';
|
||||
var q_zoom = 2;
|
||||
|
||||
initmap();
|
||||
<?php if ($this->config->item('map_gridsquares') != FALSE) { ?>
|
||||
var grid = "Yes";
|
||||
<?php } else { ?>
|
||||
var grid = "No";
|
||||
<?php } ?>
|
||||
initmap(grid);
|
||||
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
@ -23,11 +23,19 @@ function initmap(ShowGrid = 'No') {
|
||||
|
||||
// start the map in South-East England
|
||||
map.setView(new L.LatLng(q_lat, q_lng), q_zoom);
|
||||
map.addLayer(osm);
|
||||
|
||||
|
||||
map.addLayer(osm);
|
||||
askForPlots();
|
||||
|
||||
map.on('moveend', onMapMove);
|
||||
|
||||
if(ShowGrid == "Yes") {
|
||||
var maidenhead = L.maidenhead().addTo(map);
|
||||
}
|
||||
|
||||
var layerControl = new L.Control.Layers(null, {
|
||||
'Gridsquares': maidenhead = L.maidenhead()
|
||||
}).addTo(map);
|
||||
}
|
||||
|
||||
function getXmlHttpObject() {
|
||||
|
Loading…
Reference in New Issue
Block a user