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:
parent
2c7c1a4610
commit
6bf2f2b54b
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@ frames.js
|
||||||
*~
|
*~
|
||||||
*.rej
|
*.rej
|
||||||
*.orig
|
*.orig
|
||||||
|
public_html/untrackedDeveloperSettings.js
|
||||||
|
|
|
@ -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 Map = null;
|
||||||
var CenterLat = 45.0;
|
var CenterLat = CONST_CENTERLAT;
|
||||||
var CenterLon = 9.0;
|
var CenterLon = CONST_CENTERLON;
|
||||||
var ZoomLvl = 5;
|
var ZoomLvl = CONST_ZOOMLVL;
|
||||||
var Planes = {};
|
var Planes = {};
|
||||||
var PlanesOnMap = 0;
|
var PlanesOnMap = 0;
|
||||||
var PlanesOnGrid = 0;
|
var PlanesOnGrid = 0;
|
||||||
|
@ -385,12 +392,12 @@ function toggleSettings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetMap() {
|
function resetMap() {
|
||||||
localStorage['CenterLat'] = 45.0;
|
localStorage['CenterLat'] = CONST_CENTERLAT;
|
||||||
localStorage['CenterLon'] = 9.0;
|
localStorage['CenterLon'] = CONST_CENTERLON;
|
||||||
localStorage['ZoomLvl'] = 5;
|
localStorage['ZoomLvl'] = CONST_ZOOMLVL;
|
||||||
CenterLat = 45.0;
|
CenterLat = CONST_CENTERLAT;
|
||||||
CenterLon = 9.0;
|
CenterLon = CONST_CENTERLON;
|
||||||
ZoomLvl = 5;
|
ZoomLvl = CONST_ZOOMLVL;
|
||||||
Map.setZoom(parseInt(localStorage['ZoomLvl']));
|
Map.setZoom(parseInt(localStorage['ZoomLvl']));
|
||||||
Map.setCenter(new google.maps.LatLng(parseFloat(localStorage['CenterLat']),
|
Map.setCenter(new google.maps.LatLng(parseFloat(localStorage['CenterLat']),
|
||||||
parseFloat(localStorage['CenterLon'])));
|
parseFloat(localStorage['CenterLon'])));
|
||||||
|
|
Loading…
Reference in a new issue