From 9c465c174b263922e235dc1c2c7deab85a73fe22 Mon Sep 17 00:00:00 2001 From: terribl Date: Sat, 25 May 2013 11:56:32 +0300 Subject: [PATCH] Added untrackedDeveloperSettings to this branch too. Load devel settings file after config.js and settings are saved for developers even after merges. modified: .gitignore modified: public_html/config.js modified: public_html/gmap.html modified: public_html/script.js Example file --- untrackedDeveloperSettings.js --- // Load this file after config.js so these settings are used var CONST_CENTERLAT = 35.21928; var CONST_CENTERLON = -80.94406; var CONST_ZOOMLVL = 9; --- untrackedDeveloperSettings.js END --- --- .gitignore | 2 ++ public_html/config.js | 9 +++++---- public_html/gmap.html | 4 ++-- public_html/script.js | 10 +++++----- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index bba68c8..8007927 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ frames.js *~ *.rej *.orig +untrackedDeveloperSettings.js + diff --git a/public_html/config.js b/public_html/config.js index 85b5836..519fedf 100644 --- a/public_html/config.js +++ b/public_html/config.js @@ -1,15 +1,16 @@ // ---------------------------------------------------- // -// This file is to configure the configurable settings +// This file is to configure the configurable settings. +// Load this file before script.js file at gmap.html. // // ---------------------------------------------------- // The Latitude and Longitude in decimal format -var CenterLat = 35.21928; -var CenterLon = -80.94406; +var CONST_CENTERLAT = 45.0; +var CONST_CENTERLON = 9.0; // The google maps zoom level, 0 - 16, lower is further out -var ZoomLvl = 9; +var CONST_ZOOMLVL = 5; // The default marker color var MarkerColor = "rgb(127, 127, 127)"; diff --git a/public_html/gmap.html b/public_html/gmap.html index ff359ad..7bdd0f2 100644 --- a/public_html/gmap.html +++ b/public_html/gmap.html @@ -1,10 +1,10 @@ - + @@ -25,7 +25,7 @@ - GMT Time + UTC Time diff --git a/public_html/script.js b/public_html/script.js index d06266c..2617acb 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -11,6 +11,11 @@ var bSortASC=true; var bDefaultSortASC=true; var iDefaultSortCol=3; +// Get current map settings +CenterLat = Number(localStorage['CenterLat']) || CONST_CENTERLAT; +CenterLon = Number(localStorage['CenterLon']) || CONST_CENTERLON; +ZoomLvl = Number(localStorage['ZoomLvl']) || CONST_ZOOMLVL; + function fetchData() { $.getJSON('/dump1090/data.json', function(data) { PlanesOnMap = 0 @@ -148,11 +153,6 @@ function initialize() { reaper(); extendedPulse(); }, 1000); - - // Faster timer, smoother things - //window.setInterval(function() { - // printTime(); - //}, 250); } // This looks for planes to reap out of the master Planes variable