Apply same fallback colors to all maps

This commit is contained in:
phl0
2025-12-12 09:18:59 +01:00
parent 6de5cff097
commit 1004d4295c
14 changed files with 132 additions and 95 deletions

View File

@@ -34,9 +34,18 @@ var isLoading = false; // Prevent duplicate API calls
var isModalLoading = false; // Prevent duplicate modal opens
// Use user-customizable map colors (same as RAC and other awards)
var confirmedColor = user_map_custom.qsoconfirm.color;
var workedColor = user_map_custom.qso.color;
var unworkedColor = (typeof(user_map_custom.unworked) !== 'undefined') ? user_map_custom.unworked.color : 'red';
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
function showMapSpinner() {
var mapContainer = $('#polska-map');

View File

@@ -4,17 +4,17 @@ var geojson;
var map;
var info;
let unworkedColor = 'red';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
let workedColor = 'rgba(255, 0, 0)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
document.addEventListener("DOMContentLoaded", function() {

View File

@@ -1,6 +1,12 @@
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = 'red';
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}

View File

@@ -3,10 +3,19 @@ let grid_four = '';
let grid_four_lotw = '';
let grid_four_paper = '';
let confirmedColor = user_map_custom.qsoconfirm.color;
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
// Take station color for paper QSLs here
let paperColor = user_map_custom.station.color
let workedColor = user_map_custom.qso.color;
let paperColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.station) !== 'undefined') {
paperColor = user_map_custom.station.color;
}
function gridPlot(form) {
$(".ld-ext-right-plot").addClass('running');

View File

@@ -1,12 +1,12 @@
var modalloading=false;
let confirmedColor = 'rgba(144,238,144)';
if (typeof user_map_custom.qsoconfirm !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(255, 0, 0)';
if (typeof user_map_custom.qso !== 'undefined') {
workedColor = user_map_custom.qso.color;
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
document.addEventListener("DOMContentLoaded", function() {

View File

@@ -3,10 +3,19 @@ let grid_four = '';
let grid_four_lotw = '';
let grid_four_paper = '';
let confirmedColor = user_map_custom.qsoconfirm.color;
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
// Take station color for paper QSLs here
let paperColor = user_map_custom.station.color
let workedColor = user_map_custom.qso.color;
let paperColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.station) !== 'undefined') {
paperColor = user_map_custom.station.color;
}
function gridPlot(form, dxcc) {
$(".ld-ext-right-plot").addClass('running');

View File

@@ -5,13 +5,17 @@ let map;
let info;
let clickmarkers = [];
let confirmedColor = user_map_custom.qsoconfirm.color;
let workedColor = user_map_custom.qso.color;
let unworkedColor = '';
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
} else {
unworkedColor = 'red';
unworkedColor = user_map_custom.unworked.color;
}
const states = 'AG,AI,AR,BE,BL,BS,FR,GE,GL,GR,JU,LU,NE,NW,OW,SG,SH,SO,SZ,TG,TI,UR,VD,VS,ZG,ZH';

View File

@@ -1,14 +1,14 @@
let unworkedColor = 'red';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
let workedColor = 'rgba(255, 0, 0)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
var osmUrl = $('#iotamapjs').attr("tileUrl");

View File

@@ -4,17 +4,17 @@ let geojson;
let map;
let info;
let unworkedColor = 'red';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
let workedColor = 'rgba(255, 0, 0)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
function load_itu_map() {

View File

@@ -1,15 +1,15 @@
let osmUrl = tileUrl;
let unworkedColor = 'red';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
let workedColor = 'rgba(255, 0, 0)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
function load_jcc_map() {

View File

@@ -5,17 +5,17 @@ let map;
let info;
let clickmarkers = [];
let unworkedColor = 'red';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
let workedColor = 'rgba(255, 0, 0)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
const states = 'AB,BC,MB,NB,NL,NT,NS,NU,ON,PE,QC,SK,YT';

View File

@@ -5,17 +5,17 @@ let map;
let info;
let clickmarkers = [];
let unworkedColor = 'red';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
let workedColor = 'rgba(255, 0, 0)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
const states = '01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47';

View File

@@ -5,17 +5,17 @@ var map;
var info;
var clickmarkers = [];
let unworkedColor = 'red';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
let workedColor = 'rgba(255, 0, 0)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
const states = 'DR,FL,FR,GD,GR,LB,NB,NH,OV,UT,ZH,ZL';

View File

@@ -5,17 +5,17 @@ let map;
let info;
let clickmarkers = [];
let unworkedColor = 'red';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
let workedColor = 'rgba(255, 0, 0)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let confirmedColor = 'rgba(144,238,144)';
if (typeof(user_map_custom.qsoconfirm) !== 'undefined') {
confirmedColor = user_map_custom.qsoconfirm.color;
confirmedColor = user_map_custom.qsoconfirm.color;
}
let workedColor = 'rgba(229, 165, 10)';
if (typeof(user_map_custom.qso) !== 'undefined') {
workedColor = user_map_custom.qso.color;
}
let unworkedColor = 'rgba(204, 55, 45)';
if (typeof(user_map_custom.unworked) !== 'undefined') {
unworkedColor = user_map_custom.unworked.color;
}
const states = 'AK,AL,AR,AZ,CA,CO,CT,DE,FL,GA,HI,IA,ID,IL,IN,KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,MT,NC,ND,NE,NH,NJ,NM,NV,NY,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VA,VT,WA,WI,WV,WY';