Clean up config.js a bit, support configuring page name and site name.
This commit is contained in:
parent
b78b28d95f
commit
6daf116b40
|
@ -14,12 +14,20 @@ Metric = false; // true or false
|
|||
|
||||
// -- Map settings ----------------------------------------
|
||||
// These settings are overridden by any position information
|
||||
// provided by dump1090 itself
|
||||
// The Latitude and Longitude in decimal format
|
||||
CONST_CENTERLAT = 45.0;
|
||||
CONST_CENTERLON = 9.0;
|
||||
// provided by dump1090 itself. All positions are in decimal
|
||||
// degrees.
|
||||
|
||||
// Default center of the map.
|
||||
DefaultCenterLat = 45.0;
|
||||
DefaultCenterLon = 9.0;
|
||||
// The google maps zoom level, 0 - 16, lower is further out
|
||||
CONST_ZOOMLVL = 7;
|
||||
DefaultZoomLvl = 7;
|
||||
|
||||
SiteShow = false; // true to show a center marker
|
||||
SiteLat = 45.0; // position of the marker
|
||||
SiteLon = 9.0;
|
||||
SiteName = "My Radar Site"; // tooltip of the marker
|
||||
|
||||
|
||||
// -- Marker settings -------------------------------------
|
||||
// The default marker color
|
||||
|
@ -27,18 +35,13 @@ MarkerColor = "rgb(127, 127, 127)";
|
|||
SelectedColor = "rgb(225, 225, 225)";
|
||||
StaleColor = "rgb(190, 190, 190)";
|
||||
|
||||
// -- Site Settings ---------------------------------------
|
||||
// These settings are overridden by any position information
|
||||
// provided by dump1090 itself
|
||||
SiteShow = false; // true or false
|
||||
// The Latitude and Longitude in decimal format
|
||||
SiteLat = 45.0;
|
||||
SiteLon = 9.0;
|
||||
|
||||
SiteCircles = true; // true or false (Only shown if SiteShow is true)
|
||||
SiteCircles = true; // true to show circles (only shown if the center marker is shown)
|
||||
// In nautical miles or km (depending settings value 'Metric')
|
||||
SiteCirclesDistances = new Array(100,150,200);
|
||||
|
||||
|
||||
// You can disable the clocks if you want here:
|
||||
// Show the clocks at the top of the righthand pane? You can disable the clocks if you want here
|
||||
ShowClocks = true;
|
||||
|
||||
// Controls page title, righthand pane when nothing is selected
|
||||
PageName = "DUMP1090";
|
||||
|
|
|
@ -52,16 +52,16 @@
|
|||
<table width="100%">
|
||||
<tr class="infoblock_heading">
|
||||
<td>
|
||||
<b>DUMP1090</b>
|
||||
<b id="infoblock_name">DUMP1090</b>
|
||||
</td>
|
||||
<td align="right">
|
||||
<span id="dump1090_version"></span>
|
||||
<a href="https://github.com/mutability/dump1090" id="dump1090_version" target="_blank"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="infoblock_body">
|
||||
<td width="55%"> </td>
|
||||
<td width="45%" align="right"><a href="https://github.com/mutability/dump1090" target="_blank">[GitHub]</a></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
<tr class="infoblock_body dim">
|
||||
|
|
|
@ -14,10 +14,6 @@ var SpecialSquawks = {
|
|||
};
|
||||
|
||||
// Get current map settings
|
||||
var DefaultCenterLat = CONST_CENTERLAT;
|
||||
var DefaultCenterLon = CONST_CENTERLON;
|
||||
var DefaultZoomLvl = CONST_ZOOMLVL;
|
||||
|
||||
var CenterLat, CenterLon, ZoomLvl;
|
||||
|
||||
var Dump1090Version = "unknown version";
|
||||
|
@ -142,6 +138,10 @@ function fetchData() {
|
|||
|
||||
var PositionHistorySize = 0;
|
||||
function initialize() {
|
||||
// Set page basics
|
||||
$("head title").text(PageName);
|
||||
$("#infoblock_name").text(PageName);
|
||||
|
||||
PlaneRowTemplate = document.getElementById("plane_row_template");
|
||||
|
||||
if (!ShowClocks) {
|
||||
|
@ -440,7 +440,7 @@ function initialize_map() {
|
|||
position: SitePosition,
|
||||
map: GoogleMap,
|
||||
icon: markerImage,
|
||||
title: 'My Radar Site',
|
||||
title: SiteName,
|
||||
zIndex: -99999
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue