mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Custom map] Responsive map
This commit is contained in:
@@ -645,7 +645,7 @@ function getLookupResult() {
|
||||
<?php } ?>
|
||||
|
||||
var qso_loc = '<?php echo site_url('map/map_data_custom/');?><?php echo rawurlencode($date_from); ?>/<?php echo rawurlencode($date_to); ?>/<?php echo rawurlencode($this->input->post('band')); ?>';
|
||||
var q_zoom = 2;
|
||||
var q_zoom = 3;
|
||||
|
||||
$(document).ready(function(){
|
||||
<?php if ($this->config->item('map_gridsquares') != FALSE) { ?>
|
||||
@@ -653,7 +653,7 @@ function getLookupResult() {
|
||||
<?php } else { ?>
|
||||
var grid = "No";
|
||||
<?php } ?>
|
||||
initmap(grid);
|
||||
initmap(grid, 'custommap');
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -53,6 +53,6 @@
|
||||
</div>
|
||||
|
||||
<!-- Map -->
|
||||
<div id="map" style="width: 100%; height: 700px;"></div>
|
||||
<div id="custommap" style="width: 100%; height: calc(100vh - 380px) !important; max-height: 900px !important;"></div>
|
||||
|
||||
<div class="alert alert-success" role="alert">Showing QSOs for Custom Date for Active Logbook <?php echo $logbook_name ?></div>
|
||||
|
||||
@@ -10,7 +10,7 @@ var greenIcon = L.icon({
|
||||
iconSize: [10, 10], // size of the icon
|
||||
});
|
||||
|
||||
function initmap(ShowGrid = 'No') {
|
||||
function initmap(ShowGrid = 'No', MapTag = 'map') {
|
||||
// set up AJAX request
|
||||
ajaxRequest=getXmlHttpObject();
|
||||
if (ajaxRequest==null) {
|
||||
@@ -19,7 +19,7 @@ function initmap(ShowGrid = 'No') {
|
||||
}
|
||||
|
||||
// set up the map
|
||||
map = new L.Map('map');
|
||||
map = new L.Map(MapTag);
|
||||
|
||||
// create the tile layer with correct attribution
|
||||
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
|
||||
Reference in New Issue
Block a user