@chrtco/sdk 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atlas/browser.cjs +12 -12
- package/dist/atlas/browser.cjs.map +1 -1
- package/dist/atlas/browser.js +12 -12
- package/dist/atlas/browser.js.map +1 -1
- package/dist/index.cjs +61 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +61 -52
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1015,10 +1015,10 @@ var S52_DAY = {
|
|
|
1015
1015
|
// Depth
|
|
1016
1016
|
NODTA: "#a4a4a4",
|
|
1017
1017
|
DEPIT: "#009678",
|
|
1018
|
-
DEPVS: "#
|
|
1019
|
-
DEPMS: "#
|
|
1020
|
-
DEPMD: "#
|
|
1021
|
-
DEPDW: "#
|
|
1018
|
+
DEPVS: "#7fbfdf",
|
|
1019
|
+
DEPMS: "#a7d4e8",
|
|
1020
|
+
DEPMD: "#cae7f3",
|
|
1021
|
+
DEPDW: "#ecf7fc",
|
|
1022
1022
|
// Land / topography
|
|
1023
1023
|
LANDA: "#e6d1a1",
|
|
1024
1024
|
LANDF: "#c8b078",
|
|
@@ -1097,10 +1097,10 @@ var S52_DAY = {
|
|
|
1097
1097
|
var S52_DUSK = {
|
|
1098
1098
|
NODTA: "#6b6b6b",
|
|
1099
1099
|
DEPIT: "#006650",
|
|
1100
|
-
DEPVS: "#
|
|
1101
|
-
DEPMS: "#
|
|
1102
|
-
DEPMD: "#
|
|
1103
|
-
DEPDW: "#
|
|
1100
|
+
DEPVS: "#487085",
|
|
1101
|
+
DEPMS: "#608a9d",
|
|
1102
|
+
DEPMD: "#7ba6b8",
|
|
1103
|
+
DEPDW: "#95bfd0",
|
|
1104
1104
|
LANDA: "#8a7d5e",
|
|
1105
1105
|
LANDF: "#7a6a48",
|
|
1106
1106
|
CHBRN: "#6e4e30",
|
|
@@ -1168,10 +1168,10 @@ var S52_DUSK = {
|
|
|
1168
1168
|
var S52_NIGHT = {
|
|
1169
1169
|
NODTA: "#3a3a32",
|
|
1170
1170
|
DEPIT: "#003828",
|
|
1171
|
-
DEPVS: "#
|
|
1172
|
-
DEPMS: "#
|
|
1173
|
-
DEPMD: "#
|
|
1174
|
-
DEPDW: "#
|
|
1171
|
+
DEPVS: "#356577",
|
|
1172
|
+
DEPMS: "#265066",
|
|
1173
|
+
DEPMD: "#102e44",
|
|
1174
|
+
DEPDW: "#051a28",
|
|
1175
1175
|
LANDA: "#3a3020",
|
|
1176
1176
|
LANDF: "#302818",
|
|
1177
1177
|
CHBRN: "#382410",
|
|
@@ -5862,6 +5862,15 @@ var NATQUA_ABBR = [
|
|
|
5862
5862
|
// hard
|
|
5863
5863
|
];
|
|
5864
5864
|
var DARK_BG = "#1a1d23";
|
|
5865
|
+
var NAV_HALO = {
|
|
5866
|
+
WHITE: { bright: "#ffffff", night: "#b8b0a0" },
|
|
5867
|
+
CREAM: { bright: "#fdf0b0", night: "#a89868" },
|
|
5868
|
+
YELLOW: { bright: "#eab308", night: "#806020" },
|
|
5869
|
+
BLUE: { bright: "#b0c8e8", night: "#7088a0" }
|
|
5870
|
+
};
|
|
5871
|
+
function navHalo(palette, ct) {
|
|
5872
|
+
return ct === "NIGHT" ? NAV_HALO[palette].night : NAV_HALO[palette].bright;
|
|
5873
|
+
}
|
|
5865
5874
|
var NAV_AID_LABEL_TEXT_SIZE = [
|
|
5866
5875
|
"interpolate",
|
|
5867
5876
|
["linear"],
|
|
@@ -5968,9 +5977,9 @@ function getLabelBehavior(layerName) {
|
|
|
5968
5977
|
return LABEL_BEHAVIOR[layerName] ?? "feature-band-gated";
|
|
5969
5978
|
}
|
|
5970
5979
|
function getLabelConfig(layerName, opts = {}) {
|
|
5980
|
+
const ct = opts.colorTable ?? "DAY";
|
|
5971
5981
|
switch (layerName) {
|
|
5972
5982
|
case "SOUNDG": {
|
|
5973
|
-
const ct = opts.colorTable ?? "DAY";
|
|
5974
5983
|
const safetyContour = opts.safetyContour ?? 10;
|
|
5975
5984
|
const twoShade = opts.twoShadeSoundings ?? true;
|
|
5976
5985
|
const weight = opts.soundingFontWeight ?? "semibold";
|
|
@@ -6060,8 +6069,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6060
6069
|
15,
|
|
6061
6070
|
14
|
|
6062
6071
|
],
|
|
6063
|
-
textColor:
|
|
6064
|
-
textHaloColor:
|
|
6072
|
+
textColor: DARK_BG,
|
|
6073
|
+
textHaloColor: COLOR.LAND_REGION,
|
|
6065
6074
|
textHaloWidth: 1.4,
|
|
6066
6075
|
textOffset: [0, 0],
|
|
6067
6076
|
textFont: ["Open Sans Regular"],
|
|
@@ -6079,8 +6088,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6079
6088
|
type: "symbol",
|
|
6080
6089
|
textField: ["get", "OBJNAM"],
|
|
6081
6090
|
textSize: 9,
|
|
6082
|
-
textColor:
|
|
6083
|
-
textHaloColor:
|
|
6091
|
+
textColor: DARK_BG,
|
|
6092
|
+
textHaloColor: "#d4c9b0",
|
|
6084
6093
|
textHaloWidth: 1.5,
|
|
6085
6094
|
textOffset: [0, 1.2],
|
|
6086
6095
|
minzoom: 9
|
|
@@ -6092,7 +6101,7 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6092
6101
|
textSize: NAV_AID_LABEL_TEXT_SIZE,
|
|
6093
6102
|
textFont: NAV_AID_LABEL_FONT,
|
|
6094
6103
|
textColor: DARK_BG,
|
|
6095
|
-
textHaloColor: "
|
|
6104
|
+
textHaloColor: navHalo("WHITE", ct),
|
|
6096
6105
|
textHaloWidth: 1.5,
|
|
6097
6106
|
textOffset: [0, 1.5],
|
|
6098
6107
|
minzoom: 10
|
|
@@ -6104,7 +6113,7 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6104
6113
|
textSize: NAV_AID_LABEL_TEXT_SIZE,
|
|
6105
6114
|
textFont: NAV_AID_LABEL_FONT,
|
|
6106
6115
|
textColor: DARK_BG,
|
|
6107
|
-
textHaloColor: "
|
|
6116
|
+
textHaloColor: navHalo("WHITE", ct),
|
|
6108
6117
|
textHaloWidth: 1.5,
|
|
6109
6118
|
textOffset: [0, 1.5],
|
|
6110
6119
|
minzoom: 10
|
|
@@ -6117,7 +6126,7 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6117
6126
|
textSize: NAV_AID_LABEL_TEXT_SIZE,
|
|
6118
6127
|
textFont: NAV_AID_LABEL_FONT,
|
|
6119
6128
|
textColor: DARK_BG,
|
|
6120
|
-
textHaloColor: "
|
|
6129
|
+
textHaloColor: navHalo("CREAM", ct),
|
|
6121
6130
|
textHaloWidth: 1.5,
|
|
6122
6131
|
textOffset: [0, 1.5],
|
|
6123
6132
|
minzoom: 10
|
|
@@ -6130,7 +6139,7 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6130
6139
|
textSize: NAV_AID_LABEL_TEXT_SIZE,
|
|
6131
6140
|
textFont: NAV_AID_LABEL_FONT,
|
|
6132
6141
|
textColor: DARK_BG,
|
|
6133
|
-
textHaloColor: "
|
|
6142
|
+
textHaloColor: navHalo("YELLOW", ct),
|
|
6134
6143
|
textHaloWidth: 1.5,
|
|
6135
6144
|
textOffset: [0, 1.5],
|
|
6136
6145
|
minzoom: 10
|
|
@@ -6143,7 +6152,7 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6143
6152
|
textSize: NAV_AID_LABEL_TEXT_SIZE,
|
|
6144
6153
|
textFont: NAV_AID_LABEL_FONT,
|
|
6145
6154
|
textColor: DARK_BG,
|
|
6146
|
-
textHaloColor: "
|
|
6155
|
+
textHaloColor: navHalo("WHITE", ct),
|
|
6147
6156
|
textHaloWidth: 1.5,
|
|
6148
6157
|
textOffset: [0, 1.5],
|
|
6149
6158
|
minzoom: 10
|
|
@@ -6155,7 +6164,7 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6155
6164
|
textSize: NAV_AID_LABEL_TEXT_SIZE,
|
|
6156
6165
|
textFont: NAV_AID_LABEL_FONT,
|
|
6157
6166
|
textColor: DARK_BG,
|
|
6158
|
-
textHaloColor: "
|
|
6167
|
+
textHaloColor: navHalo("CREAM", ct),
|
|
6159
6168
|
textHaloWidth: 1.5,
|
|
6160
6169
|
textOffset: [2, 0],
|
|
6161
6170
|
minzoom: 9,
|
|
@@ -6191,7 +6200,7 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6191
6200
|
textSize: NAV_AID_LABEL_TEXT_SIZE,
|
|
6192
6201
|
textFont: NAV_AID_LABEL_FONT,
|
|
6193
6202
|
textColor: DARK_BG,
|
|
6194
|
-
textHaloColor: "
|
|
6203
|
+
textHaloColor: navHalo("BLUE", ct),
|
|
6195
6204
|
textHaloWidth: 1.5,
|
|
6196
6205
|
textOffset: [2, 1.2],
|
|
6197
6206
|
minzoom: 11,
|
|
@@ -6219,8 +6228,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6219
6228
|
14,
|
|
6220
6229
|
17
|
|
6221
6230
|
],
|
|
6222
|
-
textColor:
|
|
6223
|
-
textHaloColor:
|
|
6231
|
+
textColor: DARK_BG,
|
|
6232
|
+
textHaloColor: COLOR.WATER_DEEP,
|
|
6224
6233
|
textHaloWidth: 1.8,
|
|
6225
6234
|
textOffset: [0, 0],
|
|
6226
6235
|
textFont: ["Open Sans Italic"],
|
|
@@ -6250,8 +6259,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6250
6259
|
15,
|
|
6251
6260
|
14
|
|
6252
6261
|
],
|
|
6253
|
-
textColor:
|
|
6254
|
-
textHaloColor:
|
|
6262
|
+
textColor: DARK_BG,
|
|
6263
|
+
textHaloColor: COLOR.WATER,
|
|
6255
6264
|
textHaloWidth: 1.5,
|
|
6256
6265
|
textOffset: [0, 0],
|
|
6257
6266
|
textFont: ["Open Sans Italic"],
|
|
@@ -6279,8 +6288,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6279
6288
|
15,
|
|
6280
6289
|
13
|
|
6281
6290
|
],
|
|
6282
|
-
textColor:
|
|
6283
|
-
textHaloColor:
|
|
6291
|
+
textColor: DARK_BG,
|
|
6292
|
+
textHaloColor: COLOR.WATER,
|
|
6284
6293
|
textHaloWidth: 1.4,
|
|
6285
6294
|
textOffset: [0, 0],
|
|
6286
6295
|
textFont: ["Open Sans Italic"],
|
|
@@ -6306,8 +6315,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6306
6315
|
14,
|
|
6307
6316
|
11
|
|
6308
6317
|
],
|
|
6309
|
-
textColor:
|
|
6310
|
-
textHaloColor:
|
|
6318
|
+
textColor: DARK_BG,
|
|
6319
|
+
textHaloColor: COLOR.WATER,
|
|
6311
6320
|
textHaloWidth: 1.3,
|
|
6312
6321
|
textOffset: [0, 0],
|
|
6313
6322
|
textFont: ["Open Sans Italic"],
|
|
@@ -6335,8 +6344,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6335
6344
|
15,
|
|
6336
6345
|
13
|
|
6337
6346
|
],
|
|
6338
|
-
textColor:
|
|
6339
|
-
textHaloColor:
|
|
6347
|
+
textColor: DARK_BG,
|
|
6348
|
+
textHaloColor: COLOR.LAND_NATURAL,
|
|
6340
6349
|
textHaloWidth: 1.4,
|
|
6341
6350
|
textOffset: [0, 0],
|
|
6342
6351
|
textFont: ["Open Sans Regular"],
|
|
@@ -6364,8 +6373,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6364
6373
|
13,
|
|
6365
6374
|
15
|
|
6366
6375
|
],
|
|
6367
|
-
textColor:
|
|
6368
|
-
textHaloColor:
|
|
6376
|
+
textColor: DARK_BG,
|
|
6377
|
+
textHaloColor: COLOR.CITY,
|
|
6369
6378
|
textHaloWidth: 1.6,
|
|
6370
6379
|
textOffset: [0, 0],
|
|
6371
6380
|
textFont: ["Open Sans Regular"],
|
|
@@ -6436,8 +6445,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6436
6445
|
type: "symbol",
|
|
6437
6446
|
textField: ["get", "OBJNAM"],
|
|
6438
6447
|
textSize: 8,
|
|
6439
|
-
textColor:
|
|
6440
|
-
textHaloColor:
|
|
6448
|
+
textColor: DARK_BG,
|
|
6449
|
+
textHaloColor: "#c8c0b0",
|
|
6441
6450
|
textHaloWidth: 1.2,
|
|
6442
6451
|
textOffset: [0, 1.2],
|
|
6443
6452
|
minzoom: 14,
|
|
@@ -6459,8 +6468,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6459
6468
|
13,
|
|
6460
6469
|
11
|
|
6461
6470
|
],
|
|
6462
|
-
textColor:
|
|
6463
|
-
textHaloColor:
|
|
6471
|
+
textColor: DARK_BG,
|
|
6472
|
+
textHaloColor: COLOR.AIRPORT,
|
|
6464
6473
|
textHaloWidth: 1.4,
|
|
6465
6474
|
textOffset: [0, 0],
|
|
6466
6475
|
textFont: ["Open Sans Regular"],
|
|
@@ -6486,8 +6495,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6486
6495
|
16,
|
|
6487
6496
|
11
|
|
6488
6497
|
],
|
|
6489
|
-
textColor:
|
|
6490
|
-
textHaloColor:
|
|
6498
|
+
textColor: DARK_BG,
|
|
6499
|
+
textHaloColor: COLOR.SOUNDING,
|
|
6491
6500
|
textHaloWidth: 1,
|
|
6492
6501
|
textOffset: [0, 0],
|
|
6493
6502
|
textFont: ["Open Sans Italic"],
|
|
@@ -6579,8 +6588,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6579
6588
|
16,
|
|
6580
6589
|
11
|
|
6581
6590
|
],
|
|
6582
|
-
textColor:
|
|
6583
|
-
textHaloColor:
|
|
6591
|
+
textColor: DARK_BG,
|
|
6592
|
+
textHaloColor: "#3f8a34",
|
|
6584
6593
|
textHaloWidth: 1,
|
|
6585
6594
|
textOffset: [0, 0],
|
|
6586
6595
|
textFont: ["Open Sans Italic"],
|
|
@@ -6597,7 +6606,7 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6597
6606
|
case "UWTROC":
|
|
6598
6607
|
case "OBSTRN":
|
|
6599
6608
|
case "WRECKS": {
|
|
6600
|
-
const
|
|
6609
|
+
const ct2 = opts.colorTable ?? "DAY";
|
|
6601
6610
|
const valsou = [
|
|
6602
6611
|
"to-number",
|
|
6603
6612
|
["coalesce", ["get", "VALSOU"], ["get", "valsou"], 0],
|
|
@@ -6624,8 +6633,8 @@ function getLabelConfig(layerName, opts = {}) {
|
|
|
6624
6633
|
16,
|
|
6625
6634
|
11
|
|
6626
6635
|
],
|
|
6627
|
-
textColor: resolveColor("CHBLK",
|
|
6628
|
-
textHaloColor: resolveColor("CHWHT",
|
|
6636
|
+
textColor: resolveColor("CHBLK", ct2),
|
|
6637
|
+
textHaloColor: resolveColor("CHWHT", ct2),
|
|
6629
6638
|
textHaloWidth: 1.2,
|
|
6630
6639
|
// Place to the upper-right of the symbol so it doesn't sit on top
|
|
6631
6640
|
// of the asterisk / cross. Anchor top-left so the offset grows
|
|
@@ -8843,13 +8852,13 @@ function buildLayersForClass(objectClass, ct, sourceId = DEFAULT_REGION) {
|
|
|
8843
8852
|
["linear"],
|
|
8844
8853
|
["zoom"],
|
|
8845
8854
|
6,
|
|
8846
|
-
0.
|
|
8855
|
+
0.56,
|
|
8847
8856
|
12,
|
|
8848
|
-
0.
|
|
8857
|
+
0.63,
|
|
8849
8858
|
14,
|
|
8850
|
-
0.
|
|
8859
|
+
0.85,
|
|
8851
8860
|
18,
|
|
8852
|
-
1.
|
|
8861
|
+
1.4
|
|
8853
8862
|
];
|
|
8854
8863
|
const defaultIconSize = [
|
|
8855
8864
|
"interpolate",
|
|
@@ -9068,7 +9077,7 @@ function buildLayersForClass(objectClass, ct, sourceId = DEFAULT_REGION) {
|
|
|
9068
9077
|
filter: GEOM_FILTERS.fill,
|
|
9069
9078
|
layout: {
|
|
9070
9079
|
"icon-image": "ACHARE02",
|
|
9071
|
-
"icon-size": ["interpolate", ["linear"], ["zoom"], 10, 0.
|
|
9080
|
+
"icon-size": ["interpolate", ["linear"], ["zoom"], 10, 0.7, 14, 1.15, 17, 1.5],
|
|
9072
9081
|
"icon-allow-overlap": true,
|
|
9073
9082
|
"icon-ignore-placement": false,
|
|
9074
9083
|
"symbol-placement": "point",
|