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
|
||||
*.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 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'])));
|
||||
|
|
Loading…
Reference in a new issue