@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.js
CHANGED
|
@@ -28621,6 +28621,7 @@ function worldMinusBboxPolygon(bbox) {
|
|
|
28621
28621
|
// src/atlas/land-layers.ts
|
|
28622
28622
|
var LAND_SURFACE_MINZOOM = BAND_PRIORITY_RANGES["5"].minzoom;
|
|
28623
28623
|
var LAND_SURFACE_LAYERS = (id) => id === "chrtland-base" || id === "chrtland-cover" || id === "chrtland-contour" || id === "chrtland-hillshade" || id.startsWith("chrtland-fade-");
|
|
28624
|
+
var isLandGroundOverlay = (id) => LAND_SURFACE_LAYERS(id) && id !== "chrtland-base" || id === "chrtland-road";
|
|
28624
28625
|
var FADE_PX = 80;
|
|
28625
28626
|
var FADE_BANDS = 16;
|
|
28626
28627
|
function fadeAlpha(r) {
|
|
@@ -30071,21 +30072,37 @@ function generateStyle(palette = "DAY", opts = {}) {
|
|
|
30071
30072
|
];
|
|
30072
30073
|
}
|
|
30073
30074
|
{
|
|
30074
|
-
const
|
|
30075
|
-
|
|
30076
|
-
|
|
30075
|
+
const assembled = [
|
|
30076
|
+
restFinal[0],
|
|
30077
|
+
...baseBlock,
|
|
30078
|
+
...seaare,
|
|
30079
|
+
...ordered,
|
|
30080
|
+
...restFinal.slice(1)
|
|
30081
|
+
];
|
|
30082
|
+
const idOf = (l) => l.id;
|
|
30083
|
+
const isRepaint = (l) => /-overpair(-|$)/.test(idOf(l));
|
|
30077
30084
|
let lastRepaint = -1;
|
|
30078
|
-
|
|
30079
|
-
if (
|
|
30085
|
+
assembled.forEach((l, i) => {
|
|
30086
|
+
if (isRepaint(l)) lastRepaint = i;
|
|
30080
30087
|
});
|
|
30081
|
-
if (
|
|
30082
|
-
|
|
30083
|
-
|
|
30084
|
-
|
|
30085
|
-
|
|
30086
|
-
|
|
30088
|
+
if (lastRepaint === -1) return assembled;
|
|
30089
|
+
const surface = [];
|
|
30090
|
+
const kept = [];
|
|
30091
|
+
assembled.forEach((l, i) => {
|
|
30092
|
+
if (i < lastRepaint && isLandGroundOverlay(idOf(l))) surface.push(l);
|
|
30093
|
+
else kept.push(l);
|
|
30094
|
+
});
|
|
30095
|
+
if (surface.length === 0) return assembled;
|
|
30096
|
+
let landing = -1;
|
|
30097
|
+
kept.forEach((l, i) => {
|
|
30098
|
+
if (isRepaint(l)) landing = i;
|
|
30099
|
+
});
|
|
30100
|
+
return [
|
|
30101
|
+
...kept.slice(0, landing + 1),
|
|
30102
|
+
...surface,
|
|
30103
|
+
...kept.slice(landing + 1)
|
|
30104
|
+
];
|
|
30087
30105
|
}
|
|
30088
|
-
return [restFinal[0], ...baseBlock, ...seaare, ...ordered, ...restFinal.slice(1)];
|
|
30089
30106
|
})() : layers;
|
|
30090
30107
|
for (const id of [
|
|
30091
30108
|
"chrtbase-country-boundary",
|