@chrtco/sdk 0.10.29 → 0.10.30
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/index.cjs +29 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28845,6 +28845,7 @@ function worldMinusBboxPolygon(bbox) {
|
|
|
28845
28845
|
// src/atlas/land-layers.ts
|
|
28846
28846
|
var LAND_SURFACE_MINZOOM = BAND_PRIORITY_RANGES["5"].minzoom;
|
|
28847
28847
|
var LAND_SURFACE_LAYERS = (id) => id === "chrtland-base" || id === "chrtland-cover" || id === "chrtland-contour" || id === "chrtland-hillshade" || id.startsWith("chrtland-fade-");
|
|
28848
|
+
var isLandGroundOverlay = (id) => LAND_SURFACE_LAYERS(id) && id !== "chrtland-base" || id === "chrtland-road";
|
|
28848
28849
|
var FADE_PX = 80;
|
|
28849
28850
|
var FADE_BANDS = 16;
|
|
28850
28851
|
function fadeAlpha(r) {
|
|
@@ -30295,21 +30296,37 @@ function generateStyle(palette = "DAY", opts = {}) {
|
|
|
30295
30296
|
];
|
|
30296
30297
|
}
|
|
30297
30298
|
{
|
|
30298
|
-
const
|
|
30299
|
-
|
|
30300
|
-
|
|
30299
|
+
const assembled = [
|
|
30300
|
+
restFinal[0],
|
|
30301
|
+
...baseBlock,
|
|
30302
|
+
...seaare,
|
|
30303
|
+
...ordered,
|
|
30304
|
+
...restFinal.slice(1)
|
|
30305
|
+
];
|
|
30306
|
+
const idOf = (l) => l.id;
|
|
30307
|
+
const isRepaint = (l) => /-overpair(-|$)/.test(idOf(l));
|
|
30301
30308
|
let lastRepaint = -1;
|
|
30302
|
-
|
|
30303
|
-
if (
|
|
30309
|
+
assembled.forEach((l, i) => {
|
|
30310
|
+
if (isRepaint(l)) lastRepaint = i;
|
|
30304
30311
|
});
|
|
30305
|
-
if (
|
|
30306
|
-
|
|
30307
|
-
|
|
30308
|
-
|
|
30309
|
-
|
|
30310
|
-
|
|
30312
|
+
if (lastRepaint === -1) return assembled;
|
|
30313
|
+
const surface = [];
|
|
30314
|
+
const kept = [];
|
|
30315
|
+
assembled.forEach((l, i) => {
|
|
30316
|
+
if (i < lastRepaint && isLandGroundOverlay(idOf(l))) surface.push(l);
|
|
30317
|
+
else kept.push(l);
|
|
30318
|
+
});
|
|
30319
|
+
if (surface.length === 0) return assembled;
|
|
30320
|
+
let landing = -1;
|
|
30321
|
+
kept.forEach((l, i) => {
|
|
30322
|
+
if (isRepaint(l)) landing = i;
|
|
30323
|
+
});
|
|
30324
|
+
return [
|
|
30325
|
+
...kept.slice(0, landing + 1),
|
|
30326
|
+
...surface,
|
|
30327
|
+
...kept.slice(landing + 1)
|
|
30328
|
+
];
|
|
30311
30329
|
}
|
|
30312
|
-
return [restFinal[0], ...baseBlock, ...seaare, ...ordered, ...restFinal.slice(1)];
|
|
30313
30330
|
})() : layers;
|
|
30314
30331
|
for (const id of [
|
|
30315
30332
|
"chrtbase-country-boundary",
|