[hamradio-commits] [dump1090] 231/389: Added site marker (and settings for that) Shows radars location on map. Default is not showing.

Matthew Ernisse mernisse-guest at moszumanska.debian.org
Wed Nov 5 00:19:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

mernisse-guest pushed a commit to branch master
in repository dump1090.

commit 8b8f74697cfa9cd42e422dd30debad792e2ebc6f
Author: terribl <terri at rannalla.net>
Date:   Sun May 26 23:34:38 2013 +0300

    Added site marker (and settings for that)
    Shows radars location on map. Default is not showing.
    
    Settings:
    SiteShow is boolean [true|false]
    SiteLat & SiteLon in decimal format.
    
    If using untrackedDeveloperSettings.js-file these settings can be
    copy-pasted on that file:
    
    SiteShow    = false;
    SiteLat     = 45.0;
    SiteLon     = 9.0;
    
    	modified:   public_html/config.js
    	modified:   public_html/script.js
    	modified:   public_html/style.css
---
 public_html/config.js | 24 ++++++++++++++++--------
 public_html/script.js | 15 +++++++++++++++
 public_html/style.css |  2 +-
 3 files changed, 32 insertions(+), 9 deletions(-)

diff --git a/public_html/config.js b/public_html/config.js
index 519fedf..bd6dcda 100644
--- a/public_html/config.js
+++ b/public_html/config.js
@@ -1,17 +1,25 @@
-// ----------------------------------------------------
+// --------------------------------------------------------
 //
 // This file is to configure the configurable settings.
 // Load this file before script.js file at gmap.html.
 //
-// ----------------------------------------------------
+// --------------------------------------------------------
 
+// -- Map settings ----------------------------------------
 // The Latitude and Longitude in decimal format
-var CONST_CENTERLAT = 45.0;
-var CONST_CENTERLON = 9.0;
-
+CONST_CENTERLAT = 45.0;
+CONST_CENTERLON = 9.0;
 // The google maps zoom level, 0 - 16, lower is further out
-var CONST_ZOOMLVL   = 5;
+CONST_ZOOMLVL   = 5;
 
+// -- Marker settings -------------------------------------
 // The default marker color
-var MarkerColor	  = "rgb(127, 127, 127)";
-var SelectedColor = "rgb(225, 225, 225)"
+MarkerColor	  = "rgb(127, 127, 127)";
+SelectedColor = "rgb(225, 225, 225)";
+
+// -- Site Settings ---------------------------------------
+SiteShow    = false; // true or false
+// The Latitude and Longitude in decimal format
+SiteLat     = 45.0;
+SiteLon     = 9.0;
+
diff --git a/public_html/script.js b/public_html/script.js
index 4fd4212..48288c8 100644
--- a/public_html/script.js
+++ b/public_html/script.js
@@ -144,6 +144,21 @@ function initialize() {
 	}));
 
 	GoogleMap.mapTypes.set("dark_map", styledMap);
+	
+	// Add home marker if requested
+	if (SiteShow) {
+	    var siteMarker = new google.maps.LatLng(SiteLat, SiteLon);
+	    var markerImage = new google.maps.MarkerImage('http://maps.google.com/mapfiles/kml/pal4/icon57.png',
+            new google.maps.Size(32, 32),   // Image size
+            new google.maps.Point(0, 0),    // Origin point of image
+            new google.maps.Point(16, 16)); // Position where marker should point 
+	    var marker = new google.maps.Marker({
+          position: siteMarker,
+          map: GoogleMap,
+          icon: markerImage,
+          title: 'My Radar Site'
+      });
+	}
 
 	// Did our crafty user need some setup?
 	extendedInitalize();
diff --git a/public_html/style.css b/public_html/style.css
index c628ea0..5692e54 100644
--- a/public_html/style.css
+++ b/public_html/style.css
@@ -18,5 +18,5 @@ div#sidebar_container { float: left; width: 410px; margin-left: -410px; height:
 
 #selectedinfotitle  { font-size: larger; }
 #selectedinfo       { font-size: small; }
-#selectedinfo a     { text-decoration: none; color: blue;}
+#selectedinfo a     { text-decoration: none; color: blue; font-size: x-small;}
 #selectedinfo.dim   { opacity: 0.3; filter:alpha(opacity=30); /* For IE8 and earlier */ }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090.git



More information about the pkg-hamradio-commits mailing list