From fd6e815b938eb9dd87715d42801368674f43b917 Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 26 Nov 2018 20:24:14 +0000 Subject: [PATCH] Made zoom a variable, changed Social/maps to use OpenStreetMap --- application/controllers/Social.php | 1 + application/views/dashboard/index.php | 1 + application/views/social/map.php | 46 +++++---------------------- application/views/view_log/index.php | 1 + application/views/view_log/qso.php | 37 +++++++++++---------- js/leaflet/leafembed.js | 2 +- 6 files changed, 30 insertions(+), 58 deletions(-) diff --git a/application/controllers/Social.php b/application/controllers/Social.php index 5dd76d34..845b074c 100644 --- a/application/controllers/Social.php +++ b/application/controllers/Social.php @@ -23,6 +23,7 @@ class Social extends CI_Controller { function json_map($date) { $this->load->model('logbook_model'); + $this->load->library('qra'); $qsos = $this->logbook_model->map_day($date); diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index bd3ea812..af382da2 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -31,6 +31,7 @@ var qso_loc = ''; + var q_zoom = 2; $(document).ready(function(){ initmap(); diff --git a/application/views/social/map.php b/application/views/social/map.php index b14a4114..ca1f41e4 100644 --- a/application/views/social/map.php +++ b/application/views/social/map.php @@ -23,47 +23,17 @@ + diff --git a/application/views/view_log/index.php b/application/views/view_log/index.php index c6602a3e..250de54c 100644 --- a/application/views/view_log/index.php +++ b/application/views/view_log/index.php @@ -42,6 +42,7 @@ var qso_loc = ''; + var q_zoom = 2; $(document).ready(function(){ initmap(); diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index 79db9e07..d556f171 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -19,10 +19,12 @@ line-height: 1.7; margin: 10px 0; } - + + + - + num_rows() > 0) { foreach ($query->result() as $row) { ?>

QSO with COL_CALL; ?> on the COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at ".date('H:i', $timestamp); ?>

@@ -134,7 +136,7 @@ margin: 10px 0;
-
+
COL_GRIDSQUARE != null) { @@ -157,23 +159,20 @@ margin: 10px 0; } ?> - + +
diff --git a/js/leaflet/leafembed.js b/js/leaflet/leafembed.js index c54fa5fd..ca38d65e 100644 --- a/js/leaflet/leafembed.js +++ b/js/leaflet/leafembed.js @@ -22,7 +22,7 @@ function initmap() { var osm = new L.TileLayer(osmUrl, {minZoom: 1, maxZoom: 9, attribution: osmAttrib}); // start the map in South-East England - map.setView(new L.LatLng(q_lat, q_lng), 2); + map.setView(new L.LatLng(q_lat, q_lng), q_zoom); map.addLayer(osm); askForPlots();