Added global settings and untrackedDeveloperSettings.js-file.

untrackedDeveloperSettings.js
Create file and add line `var developerSettings = true;` on top of it.
After that some settings can be overwritten with deleloper's flavour.

-- Example File w/o line numbers --
var developerSettings = true;

var CONST_CENTERLAT = 60.0; // 45.0
var CONST_CENTERLON = 20.0; // 9.0
var CONST_ZOOMLVL   = 6; //5
-- End of Example File --

	modified:   .gitignore
	modified:   public_html/gmap.html
	modified:   public_html/script.js
This commit is contained in:
terribl 2013-05-23 10:36:04 +03:00
parent 2c7c1a4610
commit 6bf2f2b54b
2 changed files with 17 additions and 9 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@ frames.js
*~
*.rej
*.orig
public_html/untrackedDeveloperSettings.js

View file

@ -1,7 +1,14 @@
// "Constant" variables - Since there is no constants in make sure
// not to change these CONST_ variables.
var CONST_CENTERLAT = 45.0; // 45.0
var CONST_CENTERLON = 9.0; // 9.0
var CONST_ZOOMLVL = 5; //5
// Global variables
var Map = null;
var CenterLat = 45.0;
var CenterLon = 9.0;
var ZoomLvl = 5;
var CenterLat = CONST_CENTERLAT;
var CenterLon = CONST_CENTERLON;
var ZoomLvl = CONST_ZOOMLVL;
var Planes = {};
var PlanesOnMap = 0;
var PlanesOnGrid = 0;
@ -385,12 +392,12 @@ function toggleSettings() {
}
function resetMap() {
localStorage['CenterLat'] = 45.0;
localStorage['CenterLon'] = 9.0;
localStorage['ZoomLvl'] = 5;
CenterLat = 45.0;
CenterLon = 9.0;
ZoomLvl = 5;
localStorage['CenterLat'] = CONST_CENTERLAT;
localStorage['CenterLon'] = CONST_CENTERLON;
localStorage['ZoomLvl'] = CONST_ZOOMLVL;
CenterLat = CONST_CENTERLAT;
CenterLon = CONST_CENTERLON;
ZoomLvl = CONST_ZOOMLVL;
Map.setZoom(parseInt(localStorage['ZoomLvl']));
Map.setCenter(new google.maps.LatLng(parseFloat(localStorage['CenterLat']),
parseFloat(localStorage['CenterLon'])));