Award layer drop down and layout update

POTA now tracks offline mode as it should

timezone and all grids state saved

Move nexrad to after offline mode button

trophy layer saved/restored

some cleaning

Lint
merge-requests/313/head
Tag Loomis 2024-02-18 14:22:41 -08:00
rodzic 02eac05181
commit 2d3302bb20
6 zmienionych plików z 161 dodań i 196 usunięć

Wyświetl plik

@ -389,9 +389,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</tr>
<tr title="Select Band&#10;(Auto tracks WSJT-X)">
<td data-i18n="mapFilter.band.label">
<font color="lightgreen">Band</font>
</td>
<td data-i18n="mapFilter.band.label">Band</td>
<td>
<select id="gtBandFilter" onkeypress="return false;" onchange="gtBandFilterChanged(this);">
<option data-i18n="mapFilter.band.Auto" value="auto">Auto</option>
@ -433,9 +431,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</td>
</tr>
<tr title="Select Mode">
<td data-i18n="mapFilter.mode.label">
<font color="orange">Mode</font>
</td>
<td data-i18n="mapFilter.mode.label">Mode</td>
<td>
<select id="gtModeFilter" onkeypress="return false;" onchange="gtModeFilterChanged(this);">
<option data-i18n="mapFilter.mode.Auto" value="auto">Auto</option>
@ -447,9 +443,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</td>
</tr>
<tr title="Select Propagation Mode">
<td data-i18n="mapFilter.prop.label">
<font color="yellow">Prop</font>
</td>
<td data-i18n="mapFilter.prop.label">Prop</td>
<td>
<select id="gtPropFilter" onkeypress="return false;" onchange="gtPropFilterChanged(this);">
<option data-i18n="mapFilter.prop.Mixed" value="mixed">Mixed</option>
@ -478,9 +472,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</td>
</tr>
<tr>
<td data-i18n="mapFilter.data.label">
<font color="cyan">Data</font>
</td>
<td data-i18n="mapFilter.data.label">Data</td>
<td>
<div data-i18n="mapFilter.data.LogLive" id="gridViewButton" onclick="cycleGridView()" class="button"
title="Cycle Grid View" style="
@ -495,46 +487,51 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</div>
</td>
</tr>
<tr>
<td data-i18n="roster.award.Award">Award</td>
<td>
<select id="gtTrophyLayer" onkeypress="return false;" onchange="gtTrophyLayerChanged(this);">
<option data-i18n="settings.OAMS.message.newAlert.none" value="0">None</option>
<option value="1">CQ</option>
<option value="2">ITU</option>
<option value="3">WAC</option>
<option value="4">WAS</option>
<option value="5">DXCC</option>
<option value="6">USC</option>
<option value="7">US48</option>
<option value="8">WACP</option>
</select>
</td>
</tr>
</table>
</div>
<div id="buttonsDiv" style="margin-left: 0px; white-space: normal">
<div id="callRosterButton" class="iconButton" style="padding: 0px" onclick="openCallRosterWindow();"
title="Open Call Roster">
<img src="./img/roster-button.png" class="buttonImgWide" />
</div>
<div id="pushPinButton" onclick="togglePushPinMode();" class="iconButton" title="Toggle Push-Pin Mode">
<img id="pinImg" src="" class="buttonImg" />
</div>
<div id="lookupButton" onclick="openLookupWindow(true)" class="iconButton" title="Open Lookup Window">
<img src="./img/lookup.png" class="buttonImg" />
</div>
<div id="statsDiv" onclick="showRootInfoBox();" class="iconButton" title="Show Stats">
<img src="./img/stats-button.png" class="buttonImg" />
</div>
<div id="modeModeDiv" onclick="toggleOffline()" class="iconButton" title="Toggle Online/Offline Mode">
<img id="offlineImg" src="" class="buttonImg" />
</div>
<div id="earthShadow" onclick="toggleEarth()" class="iconButton" title="Toggle Grayline">
<img id="earthImg" src="" class="buttonImg" />
<div id="callRosterButton" class="iconButton" onclick="openCallRosterWindow();" title="Open Call Roster">
<img src="./img/roster-icon.png" class="buttonImg" />
</div>
<div id="legendToggleDiv" onclick="toggleLegend()" class="iconButton" title="Toggle Map Legend">
<img id="legendImg" src="./img/gt_key.png" class="buttonImg" />
</div>
<div id="gtShareButton" onclick="toggleGtShareEnable();" class="iconButton"
title="Share your On-Air Status with other GridTracker users">
<img id="gtShareFlagImg" src="./img/share-off.png" class="buttonImg" />
<div id="pushPinButton" onclick="togglePushPinMode();" class="iconButton" title="Toggle Push-Pin Mode">
<img id="pinImg" src="" class="buttonImg" />
</div>
<div id="helpButton" onclick="toggleHelp();" class="iconButton" title="Toggle Hotkey List">
<img src="./img/help.png" class="buttonImg" />
<div id="gridModeDiv" onclick="toggleGridMode()" class="iconButton" title="Toggle Maidenhead Width">
<img id="modeImg" src="" class="buttonImg" />
</div>
<div id="trophyButton" onclick="cycleTrophyOverlay();" class="iconButton" title="Cycle Award Overlays">
<img id="trophyImg" src="./img/blank_trophy.png" class="buttonImg" />
<div id="statsDiv" onclick="showRootInfoBox();" class="iconButton" title="Show Stats">
<img src="./img/stats-button.png" class="buttonImg" />
</div>
<div id="earthShadow" onclick="toggleEarth()" class="iconButton" title="Toggle Grayline">
<img id="earthImg" src="" class="buttonImg" />
</div>
<div id="lunaButton" onclick="toggleMoon();" class="iconButton" title="Toggle Moon">
<img id="lunaButonImg" src="./img/luna.png" class="buttonImg" />
</div>
<div id="gridModeDiv" onclick="toggleGridMode()" class="iconButton" title="Toggle Maidenhead Width">
<img id="modeImg" src="" class="buttonImg" />
<!--div id="trophyButton" onclick="cycleTrophyOverlay();" class="iconButton" title="Cycle Award Overlays">
<img id="trophyImg" src="./img/blank_trophy.png" class="buttonImg" />
</div-->
<div id="helpButton" onclick="toggleHelp();" class="iconButton" title="Toggle Hotkey List">
<img src="./img/help.png" class="buttonImg" />
</div>
<div id="alterMuteDiv" onclick="toggleAlertMute()" class="iconButton" title="Toggle Audio Mute">
<img id="alertMuteImg" src="" class="buttonImg" />
@ -545,24 +542,34 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<div id="adifLoadDiv" onclick="adifLoadDialog()" class="iconButton" title="Load ADIF Log">
<img src="./img/adif.png" class="buttonImg" />
</div>
<div id="buttonAdifCheckBoxDiv" onclick="startupAdifLoadFunction()" class="iconButton"
title="Reload Local ADIF Files">
<img src="./img/log_local.png" class="buttonImg" />
</div>
<div id="timezoneButton" onclick="toggleTimezones()" class="iconButton" title="Toggle Timezone Layer">
<img id="timezoneImg" src="./img/timezone-button.png" class="buttonImg" />
</div>
<div id="gridOverlayButton" onclick="toggleAllGrids()" class="iconButton" title="Toggle All Grid Overlay">
<img id="gridOverlayImg" src="./img/grid-overlay.png" class="buttonImg" />
</div>
<div id="modeModeDiv" onclick="toggleOffline()" class="iconButton" title="Toggle Online/Offline Mode">
<img id="offlineImg" src="" class="buttonImg" />
</div>
<div id="radarButton" onclick="toggleNexrad()" class="iconButton" title="Toggle US Nexrad">
<img id="radarImg" src="./img/radar-button.png" class="buttonImg" />
</div>
<div id="conditionsButton" onclick="showConditionsBox();" class="iconButton" title="View Current Conditions">
<img src="./img/conditions.png" class="buttonImg" />
</div>
<div id="buttonSpotsBoxDiv" onclick="cycleSpotsView()" class="iconButton" title="View Spot Reports">
<img id="spotsButtonImg" src="./img/spots.png" class="buttonImg" />
</div>
<div id="donateButton" onclick="gotoDonate();" class="iconButton" title="Donate with PayPal">
<img style="-webkit-filter: brightness(50%); filter: brightness(50%)" src="./img/donate.png"
class="buttonImg" />
</div>
<div id="timezoneButton" onclick="toggleTimezones()" class="iconButton" title="Toggle Timezone Layer">
<img id="timezoneImg" src="./img/timezone-button.png" class="buttonImg" />
</div>
<div id="radarButton" onclick="toggleNexrad()" class="iconButton" title="Toggle US Nexrad">
<img id="radarImg" src="./img/radar-button.png" class="buttonImg" />
</div>
<div id="gridOverlayButton" onclick="toggleAllGrids()" class="iconButton" title="Toggle All Grid Overlay">
<img id="gridOverlayImg" src="./img/grid-overlay.png" class="buttonImg" />
</div>
<div id="buttonSpotsBoxDiv" onClick="cycleSpotsView();" class="iconButton" title="View Spot Reports">
<img id="spotsButtonImg" src="./img/spots.png" class="buttonImg" />
<div id="lookupButton" onclick="openLookupWindow(true)" class="iconButton" title="Open Lookup Window">
<img src="./img/lookup.png" class="buttonImg" />
</div>
<div id="buttonQRZCheckBoxDiv" onclick="if ( ValidateQrzApi(qrzApiKey ) ) grabQrzComLog()" class="iconButton"
title="Download log from QRZ.com">
@ -578,13 +585,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
title="Download log from ClubLog">
<img id="ClubLogImg" src="./img/log_club.png" class="buttonImg" />
</div>
<div id="buttonAdifCheckBoxDiv" onclick="startupAdifLoadFunction()" class="iconButton"
title="Reload Local ADIF Files">
<img src="./img/log_local.png" class="buttonImg" />
</div>
<div id="potaButton" onClick="togglePotaMap();" class="iconButton" title="Parks On The Air">
<img id="potaImg" src="./img/pota.png" class="buttonImg" />
</div>
<div id="gtShareButton" onclick="toggleGtShareEnable();" class="iconButton"
title="Share your On-Air Status with other GridTracker users">
<img id="gtShareFlagImg" src="./img/share-off.png" class="buttonImg" />
</div>
<div id="gtFlagButton" onclick="toggleGtMap();" class="iconButton" title="Toggle View GridTracker Users">
<img id="gtFlagImg" src="" class="buttonImg" />
</div>

Wyświetl plik

@ -134,6 +134,9 @@ var def_mapSettings = {
splitQSL: true,
trafficDecode: true,
usNexrad: false,
timezonesEnable: 0,
showAllGrids: false,
trophyOverlay: 0,
zoom: 4,
mapTrans: 0.5
};

Wyświetl plik

@ -133,10 +133,7 @@ function loadAllSettings()
GT.appSettings = loadDefaultsAndMerge("appSettings", def_appSettings);
GT.mapSettings = loadDefaultsAndMerge("mapSettings", def_mapSettings);
GT.legendColors = loadDefaultsAndMerge("legendColors", def_legendColors);
GT.adifLogSettings = loadDefaultsAndMerge(
"adifLogSettings",
def_adifLogSettings
);
GT.adifLogSettings = loadDefaultsAndMerge("adifLogSettings", def_adifLogSettings);
if (typeof GT.adifLogSettings.lastFetch.lotw_qso == "string")
{
// covnert to int!
@ -145,31 +142,15 @@ function loadAllSettings()
saveAdifSettings();
}
GT.msgSettings = loadDefaultsAndMerge("msgSettings", def_msgSettings);
GT.receptionSettings = loadDefaultsAndMerge(
"receptionSettings",
def_receptionSettings
);
GT.receptionSettings = loadDefaultsAndMerge("receptionSettings", def_receptionSettings);
GT.N1MMSettings = loadDefaultsAndMerge("N1MMSettings", def_N1MMSettings);
GT.log4OMSettings = loadDefaultsAndMerge("log4OMSettings", def_log4OMSettings);
GT.dxkLogSettings = loadDefaultsAndMerge("dxkLogSettings", def_dxkLogSettings);
GT.HRDLogbookLogSettings = loadDefaultsAndMerge(
"HRDLogbookLogSettings",
def_HRDLogbookLogSettings
);
GT.pstrotatorSettings = loadDefaultsAndMerge(
"pstrotatorSettings",
def_pstrotatorSettings
);
GT.HRDLogbookLogSettings = loadDefaultsAndMerge("HRDLogbookLogSettings", def_HRDLogbookLogSettings);
GT.pstrotatorSettings = loadDefaultsAndMerge("pstrotatorSettings", def_pstrotatorSettings);
GT.acLogSettings = loadDefaultsAndMerge("acLogSettings", def_acLogSettings);
GT.trustedQslSettings = loadDefaultsAndMerge(
"trustedQslSettings",
def_trustedQslSettings
);
GT.callsignLookups = loadDefaultsAndMerge(
"callsignLookups",
def_callsignLookups
);
GT.trustedQslSettings = loadDefaultsAndMerge("trustedQslSettings", def_trustedQslSettings);
GT.callsignLookups = loadDefaultsAndMerge("callsignLookups", def_callsignLookups);
GT.bandActivity = loadDefaultsAndMerge("bandActivity", def_bandActivity);
GT.startupLogs = loadArrayIfExists("startupLogs");
@ -197,6 +178,7 @@ GT.crScript = GT.appSettings.crScript;
GT.spotView = GT.appSettings.spotView;
GT.myLat = GT.mapSettings.latitude;
GT.myLon = GT.mapSettings.longitude;
GT.currentOverlay = GT.mapSettings.trophyOverlay;
function loadDefaultsAndMerge(key, def)
{
@ -413,7 +395,7 @@ GT.flightPathTotal = (9 + 3 + 3) * 2;
GT.lastMessages = Array();
GT.lastTraffic = Array();
GT.showAllGrids = false;
GT.maps = Array();
GT.modes = {};
GT.modes_phone = {};
@ -646,7 +628,7 @@ GT.gridViewArray[1] = "Live";
GT.gridViewArray[2] = "Logbook";
GT.gridViewArray[3] = "Logbook &amp; Live";
GT.trophyImageArray = Array();
/* GT.trophyImageArray = Array();
GT.trophyImageArray[0] = "./img/blank_trophy.png";
GT.trophyImageArray[1] = "./img/cq_trophy.png";
GT.trophyImageArray[2] = "./img/itu_trophy.png";
@ -655,7 +637,7 @@ GT.trophyImageArray[4] = "./img/was_trophy.png";
GT.trophyImageArray[5] = "./img/dxcc_trophy.png";
GT.trophyImageArray[6] = "./img/usc_trophy.png";
GT.trophyImageArray[7] = "./img/us48_trophy.png";
GT.trophyImageArray[8] = "./img/wacp_trophy.png";
GT.trophyImageArray[8] = "./img/wacp_trophy.png"; */
GT.viewInfo = {};
GT.viewInfo[0] = ["qsoGrids", "Grids", 0, 0, 0];
@ -712,8 +694,7 @@ function gtPropFilterChanged(selector)
function setBandAndModeToAuto()
{
GT.appSettings.gtModeFilter = GT.appSettings.gtBandFilter = gtBandFilter.value = gtModeFilter.value =
"auto";
GT.appSettings.gtModeFilter = GT.appSettings.gtBandFilter = gtBandFilter.value = gtModeFilter.value = "auto";
redrawGrids();
redrawPins();
redrawSpots();
@ -807,9 +788,10 @@ function toggleOffline()
conditionsButton.style.display = "inline-block";
gtFlagButton.style.display = "inline-block";
gtShareButton.style.display = "inline-block";
lookupButton.style.display = "inline-block";
buttonSpotsBoxDiv.style.display = "inline-block";
donateButton.style.display = "inline-block";
radarButton.style.display = "inline-block";
potaButton.style.display = (GT.appSettings.potaEnabled == 1 && GT.appSettings.potaShowMenu) ? "inline-block" : "none";
@ -840,9 +822,14 @@ function toggleOffline()
}
}
bandActivityDiv.style.display = "block";
if (GT.lookupWindowInitialized == false)
{
openLookupWindow(false);
}
}
else
{
openLookupWindow(false);
GT.mapSettings.offlineMode = true;
offlineImg.src = GT.mapImageArray[0];
conditionsButton.style.display = "none";
@ -857,10 +844,14 @@ function toggleOffline()
donateButton.style.display = "none";
potaButton.style.display = "none";
buttonSpotsBoxDiv.style.display = "none";
lookupButton.style.display = "none";
radarButton.style.display = "none";
setGtShareButtons();
}
displayNexrad();
loadMapSettings();
changeMapValues();
goProcessRoster();
}
// from GridTracker.html
@ -1250,9 +1241,7 @@ function changePathWidth()
var featureStroke = featureStyle.getStroke();
var color = GT.flightPaths[i].isQRZ ? getQrzPathColor() : getPathColor();
var width = GT.flightPaths[i].isQRZ
? qrzPathWidthValue.value
: pathWidthValue.value;
var width = GT.flightPaths[i].isQRZ ? qrzPathWidthValue.value : pathWidthValue.value;
if (width == 0)
{
@ -1525,11 +1514,7 @@ function createTooltTipTable(toolElement)
newCallList.push(GT.QSOhash[KeyIsHash]);
}
}
if (
toolElement.qth in GT.liveGrids &&
GT.liveGrids[toolElement.qth].rectangle != null &&
GT.liveGrids[toolElement.qth].isTriangle == false
)
if (toolElement.qth in GT.liveGrids && GT.liveGrids[toolElement.qth].rectangle != null && GT.liveGrids[toolElement.qth].isTriangle == false)
{
for (var KeyIsCall in GT.liveGrids[toolElement.qth].rectangle.liveHash)
{
@ -1666,9 +1651,7 @@ function renderTooltipWindow(feature)
try
{
createTooltTipTable(feature);
var adif = GT.popupWindowHandle.window.document.getElementById(
"adifTable"
);
var adif = GT.popupWindowHandle.window.document.getElementById("adifTable");
adif.innerHTML = GT.passingToolTipTableString;
var positionInfo = myTooltip.getBoundingClientRect();
GT.popupWindowHandle.show();
@ -2355,8 +2338,6 @@ function toggleHelp()
function onMyKeyUp(event) { }
GT.currentOverlay = 0;
function cycleTrophyOverlay()
{
GT.currentOverlay++;
@ -2377,18 +2358,8 @@ function didConfirm(testObj)
function makeTitleInfo(mapWindow)
{
var band =
GT.appSettings.gtBandFilter.length == 0
? "Mixed"
: GT.appSettings.gtBandFilter == "auto"
? GT.appSettings.myBand
: GT.appSettings.gtBandFilter;
var mode =
GT.appSettings.gtModeFilter.length == 0
? "Mixed"
: GT.appSettings.gtModeFilter == "auto"
? GT.appSettings.myMode
: GT.appSettings.gtModeFilter;
var band = GT.appSettings.gtBandFilter.length == 0 ? "Mixed" : GT.appSettings.gtBandFilter == "auto" ? GT.appSettings.myBand : GT.appSettings.gtBandFilter;
var mode = GT.appSettings.gtModeFilter.length == 0 ? "Mixed" : GT.appSettings.gtModeFilter == "auto" ? GT.appSettings.myMode : GT.appSettings.gtModeFilter;
var news = `GridTracker ${gtVersionStr} [Band: ${band} Mode: ${mode}`;
var end = "]";
@ -2400,22 +2371,25 @@ function makeTitleInfo(mapWindow)
if (GT.currentOverlay == 0 && GT.appSettings.gridViewMode == 1) { return news + end; }
var workline = ` - Worked ${GT.viewInfo[GT.currentOverlay][2]} Confirmed ${GT.viewInfo[GT.currentOverlay][3]}`
if (
GT.viewInfo[GT.currentOverlay][2] <= GT.viewInfo[GT.currentOverlay][4] &&
GT.viewInfo[GT.currentOverlay][4] > 0
)
var workline = ` - Worked ${GT.viewInfo[GT.currentOverlay][2]} Confirmed ${GT.viewInfo[GT.currentOverlay][3]}`;
if (GT.viewInfo[GT.currentOverlay][2] <= GT.viewInfo[GT.currentOverlay][4] && GT.viewInfo[GT.currentOverlay][4] > 0)
{
end = ` Needed ${(GT.viewInfo[GT.currentOverlay][4] - GT.viewInfo[GT.currentOverlay][2])}]`;
}
return news + workline + end;
}
function gtTrophyLayerChanged(element)
{
setTrophyOverlay(element.value);
saveMapSettings();
}
function setTrophyOverlay(which)
{
GT.currentOverlay = which;
gtTrophyLayer.value = GT.currentOverlay = GT.mapSettings.trophyOverlay = which;
window.document.title = makeTitleInfo(true);
trophyImg.src = GT.trophyImageArray[which];
// trophyImg.src = GT.trophyImageArray[which];
myTrophyTooltip.style.zIndex = -1;
clearCurrentShapes();
// set the scope of key
@ -2427,11 +2401,7 @@ function setTrophyOverlay(which)
{
GT.layerVectors[key].setVisible(true);
}
if (
GT.appSettings.gtFlagImgSrc > 0 &&
GT.appSettings.gtShareEnable == true &&
GT.mapSettings.offlineMode == false
)
if (GT.appSettings.gtFlagImgSrc > 0 && GT.appSettings.gtShareEnable == true && GT.mapSettings.offlineMode == false)
{
GT.layerVectors.gtflags.setVisible(true);
}
@ -2440,7 +2410,7 @@ function setTrophyOverlay(which)
GT.layerVectors.gtflags.setVisible(false);
}
GT.layerVectors.award.setVisible(false);
if (GT.showAllGrids == false)
if (GT.mapSettings.showAllGrids == false)
{
GT.layerVectors.lineGrids.setVisible(false);
GT.layerVectors.bigGrids.setVisible(false);
@ -2448,14 +2418,7 @@ function setTrophyOverlay(which)
}
if (GT.timezoneLayer)
{
if (GT.timezonesEnable == 1)
{
GT.timezoneLayer.setVisible(true);
}
else
{
GT.timezoneLayer.setVisible(false);
}
GT.timezoneLayer.setVisible(true);
}
}
else
@ -2473,11 +2436,7 @@ function setTrophyOverlay(which)
{
GT.layerVectors[key].setVisible(true);
}
if (
GT.appSettings.gtFlagImgSrc > 0 &&
GT.appSettings.gtShareEnable == true &&
GT.mapSettings.offlineMode == false
)
if (GT.appSettings.gtFlagImgSrc > 0 && GT.appSettings.gtShareEnable == true && GT.mapSettings.offlineMode == false)
{
GT.layerVectors.gtflags.setVisible(true);
}
@ -2736,14 +2695,7 @@ function setTrophyOverlay(which)
updateSpotView(true);
}
function gridFeature(
key,
objectData,
propname,
fillColor,
borderColor,
borderWidth
)
function gridFeature(key, objectData, propname, fillColor, borderColor, borderWidth)
{
var style = new ol.style.Style({
stroke: new ol.style.Stroke({
@ -2978,9 +2930,7 @@ function mouseDownGrid(longlat)
GT.MyCurrentGrid = grid.substr(0, 4);
var worker = "";
worker += "<table align='center' class='darkTable'><tr style='color:white;'>";
var bearing = parseInt(
MyCircle.bearing(GT.myLat, GT.myLon, longlat[1], longlat[0])
);
var bearing = parseInt(MyCircle.bearing(GT.myLat, GT.myLon, longlat[1], longlat[0]));
worker += "<tr><td>Dist</td><td style='color:lightgreen'>" +
parseInt(
MyCircle.distance(
@ -3799,7 +3749,7 @@ function trafficDecodeView()
if (GT.mapSettings.trafficDecode == false)
{
trafficDiv.innerHTML = "";
GT.lastTraffic = Array();
GT.lastTraffic = [];
}
}
@ -3855,15 +3805,15 @@ function setAnimateView()
function toggleAnimate()
{
animateValue.checked = animateValue.checked != true;
animateValue.checked = !animateValue.checked;
changeAnimate();
}
function toggleAllGrids()
{
GT.showAllGrids = !GT.showAllGrids;
GT.mapSettings.showAllGrids = !GT.mapSettings.showAllGrids;
setTrophyOverlay(GT.currentOverlay);
gridOverlayImg.style.filter = GT.showAllGrids ? "" : "grayscale(1)";
gridOverlayImg.style.filter = GT.mapSettings.showAllGrids ? "" : "grayscale(1)";
}
function changeAnimate()
@ -4777,8 +4727,6 @@ GT.lasttimezone = null;
GT.nexradInterval = null;
GT.nexradEnable = 0;
function createNexRad()
{
var layerSource = new ol.source.TileWMS({
@ -4799,16 +4747,20 @@ function createNexRad()
function toggleNexrad()
{
GT.nexradEnable ^= 1;
if (GT.nexradEnable == 1)
{
if (GT.Nexrad != null)
{
GT.map.removeLayer(GT.Nexrad);
}
GT.mapSettings.usNexrad = !GT.mapSettings.usNexrad;
displayNexrad();
saveMapSettings();
}
GT.Nexrad = createNexRad();
GT.map.addLayer(GT.Nexrad);
function displayNexrad()
{
if (GT.mapSettings.usNexrad && GT.mapSettings.offlineMode == false)
{
if (GT.Nexrad == null)
{
GT.Nexrad = createNexRad();
GT.map.addLayer(GT.Nexrad);
}
if (GT.nexradInterval == null) { GT.nexradInterval = nodeTimers.setInterval(nexradRefresh, 600000); }
}
@ -4826,14 +4778,12 @@ function toggleNexrad()
}
}
GT.mapSettings.usNexrad = GT.nexradEnable == 1;
radarImg.style.filter = GT.mapSettings.usNexrad ? "" : "grayscale(1)";
saveMapSettings();
}
function nexradRefresh()
{
if (GT.Nexrad != null)
if (GT.Nexrad != null && GT.mapSettings.offlineMode == false)
{
GT.Nexrad.getSource().updateParams({ ol3_salt: Math.random() });
GT.Nexrad.getSource().refresh();
@ -5923,7 +5873,7 @@ function finalWsjtxDecode(newMessage, isFox = false, foxMessage)
canPath = true;
}
if (theirQTH in GT.liveGrids)
if (theirQTH in GT.liveGrids)
{
GT.liveGrids[theirQTH].age = GT.timeNow;
}
@ -8064,6 +8014,8 @@ function openAlertWindow(show = true)
function openLookupWindow(show = false)
{
if (GT.mapSettings.offlineMode == true) return;
if (GT.lookupWindowHandle == null)
{
popupNewWindows();
@ -11137,34 +11089,35 @@ function loadMaidenHeadData()
initAdifWorker();
}
GT.timezonesEnable = 0;
GT.timezoneLayer = null;
function createZoneLayer()
{
GT.timezoneLayer = createGeoJsonLayer(
"tz",
"./data/combined-with-oceans.json",
"#000088FF",
0.5
);
GT.map.addLayer(GT.timezoneLayer);
GT.timezoneLayer.setVisible(false);
}
function toggleTimezones()
{
if (GT.currentOverlay != 0) return;
GT.mapSettings.timezonesEnable ^= 1;
displayTimezones();
}
GT.timezonesEnable ^= 1;
function displayTimezones()
{
timezoneImg.style.filter = GT.mapSettings.timezonesEnable == 1 ? "" : "grayscale(1)";
if (GT.timezonesEnable == 1)
if (GT.mapSettings.timezonesEnable == 1)
{
if (GT.timezoneLayer == null)
{
createZoneLayer();
GT.timezoneLayer = createGeoJsonLayer(
"tz",
"./data/combined-with-oceans.json",
"#000088FF",
0.5
);
GT.map.addLayer(GT.timezoneLayer);
GT.timezoneLayer.setVisible(false);
}
if (GT.currentOverlay == 0)
{
GT.timezoneLayer.setVisible(true);
}
GT.timezoneLayer.setVisible(true);
}
else
{
@ -11174,8 +11127,6 @@ function toggleTimezones()
GT.timezoneLayer = null;
}
}
timezoneImg.style.filter = GT.timezonesEnable == 1 ? "" : "grayscale(1)";
}
function drawAllGrids()
@ -11577,9 +11528,9 @@ function loadMapSettings()
setSpotImage();
timezoneImg.style.filter = GT.timezonesEnable == 1 ? "" : "grayscale(1)";
timezoneImg.style.filter = GT.mapSettings.timezonesEnable == 1 ? "" : "grayscale(1)";
radarImg.style.filter = GT.mapSettings.usNexrad ? "" : "grayscale(1)";
gridOverlayImg.style.filter = GT.showAllGrids ? "" : "grayscale(1)";
gridOverlayImg.style.filter = GT.mapSettings.showAllGrids ? "" : "grayscale(1)";
GT.bandToColor = JSON.parse(JSON.stringify(GT.pskColors));
@ -12187,6 +12138,10 @@ function loadAdifSettings()
document.getElementById(where).style.display = "none";
}
}
else
{
delete GT.adifLogSettings.menu[key];
}
}
for (var key in GT.adifLogSettings.startup)
{
@ -12318,6 +12273,8 @@ function startupButtonsAndInputs()
bandActivityDiv.style.display = "none";
buttonSpotsBoxDiv.style.display = "none";
potaButton.style.display = "none";
lookupButton.style.display = "none";
radarButton.style.display = "none";
}
setGtShareButtons();
@ -12348,18 +12305,16 @@ function postInit()
updateForwardListener();
addLastTraffic("GridTracker</br>" + gtShortVersion);
GT.nexradEnable = GT.mapSettings.usNexrad ? 0 : 1;
toggleNexrad();
displayNexrad();
displayTimezones();
if (String(gtVersion) != String(GT.startVersion))
{
// generalbut.className = "settingsTablinks";
showSettingsBox();
openSettingsTab(updatebut, "updateSettingsDiv");
}
GT.finishedLoading = true;
// tagme
var x = document.querySelectorAll("input[type='range']");
for (var i = 0; i < x.length; i++)
{

Wyświetl plik

@ -143,7 +143,7 @@ function redrawParks()
{
GT.layerSources.pota.clear();
if (GT.appSettings.potaEnabled == 1 && GT.appSettings.potaMapEnabled)
if (GT.appSettings.potaEnabled == 1 && GT.appSettings.potaMapEnabled && GT.mapSettings.offlineMode == false)
{
GT.pota.mapParks = {};
makeParkFeatures();

Wyświetl plik

@ -14,7 +14,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
const currentYear = new Date().getFullYear();
const currentYearSuffix = `&rsquo;${currentYear - 2000}`;
const potaEnabled = (window.opener.GT.appSettings.potaEnabled == 1);
const potaEnabled = (window.opener.GT.appSettings.potaEnabled == 1 && window.opener.GT.mapSettings.offlineMode == false);
// TODO: Hunting results might be used to filter, based on the "Callsigns: Only Wanted" option,
// so maybe we can move this loop first, and add a check to the filtering loop?

Wyświetl plik

@ -44,7 +44,7 @@ function renderRoster(callRoster, rosterSettings)
columnOverrides.OAMS = false;
}
if (window.opener.GT.appSettings.potaEnabled == 1)
if (window.opener.GT.appSettings.potaEnabled == 1 && window.opener.GT.mapSettings.offlineMode == false)
{
huntingMatrixPotaDiv.style.display = "";
}