maplibre-gl-components 0.18.1 → 0.18.2
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/{ControlGrid-DxeDI-Uo.js → ControlGrid-DF9cqAs-.js} +101 -13
- package/dist/{ControlGrid-BUNfuXTI.cjs → ControlGrid-aiCMfRCs.cjs} +9 -9
- package/dist/{DuckDBConverter-BbDoZzve.cjs → DuckDBConverter-Y6NErH0b.cjs} +1 -1
- package/dist/{DuckDBConverter-BFlaIx_B.js → DuckDBConverter-vGi-9-yB.js} +1 -1
- package/dist/{ShapefileConverter-B4VbwMAU.js → ShapefileConverter-CrlSFMFB.js} +1 -1
- package/dist/{ShapefileConverter-cTnNg_Wi.cjs → ShapefileConverter-D7XctUfl.cjs} +1 -1
- package/dist/{geotiff-rJr7EH3E.cjs → geotiff-CcpsgthF.cjs} +2 -2
- package/dist/{geotiff-CIwO_lK2.js → geotiff-DFHxtBMv.js} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{lerc-q2Sjma2n.js → lerc-CJ2wXXF6.js} +1 -1
- package/dist/{lerc-CW8uLXzQ.cjs → lerc-rUC4YZ0e.cjs} +1 -1
- package/dist/{maplibre-geoman.es-DdAb0aoL.cjs → maplibre-geoman.es-DUGKSxPP.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/types/lib/core/ColorbarGuiControl.d.ts +1 -0
- package/dist/types/lib/core/ColorbarGuiControl.d.ts.map +1 -1
- package/dist/types/lib/core/HtmlGuiControl.d.ts +1 -0
- package/dist/types/lib/core/HtmlGuiControl.d.ts.map +1 -1
- package/dist/types/lib/core/LegendGuiControl.d.ts +1 -0
- package/dist/types/lib/core/LegendGuiControl.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3054,7 +3054,7 @@ var mq = {
|
|
|
3054
3054
|
if (t === "shapefile") {
|
|
3055
3055
|
if (!this._shapefileConverter) {
|
|
3056
3056
|
this._updateLoading("Loading Shapefile converter...");
|
|
3057
|
-
const { getShapefileConverter: s } = await import("./ShapefileConverter-
|
|
3057
|
+
const { getShapefileConverter: s } = await import("./ShapefileConverter-CrlSFMFB.js").then((a) => a.n);
|
|
3058
3058
|
this._shapefileConverter = s();
|
|
3059
3059
|
}
|
|
3060
3060
|
const r = await this._shapefileConverter.convert(n, e.name, i);
|
|
@@ -3062,9 +3062,9 @@ var mq = {
|
|
|
3062
3062
|
} else if (Fae(t)) {
|
|
3063
3063
|
if (!this._duckdbConverter) {
|
|
3064
3064
|
this._updateLoading("Loading DuckDB converter...");
|
|
3065
|
-
const { getDuckDBConverter: s } = await import("./DuckDBConverter-
|
|
3065
|
+
const { getDuckDBConverter: s } = await import("./DuckDBConverter-vGi-9-yB.js").then((a) => a.n);
|
|
3066
3066
|
if (this._duckdbConverter = s(), this._options.duckdbBundleUrl) {
|
|
3067
|
-
const { DuckDBConverter: a } = await import("./DuckDBConverter-
|
|
3067
|
+
const { DuckDBConverter: a } = await import("./DuckDBConverter-vGi-9-yB.js").then((l) => l.n);
|
|
3068
3068
|
this._duckdbConverter = new a(this._options.duckdbBundleUrl);
|
|
3069
3069
|
}
|
|
3070
3070
|
}
|
|
@@ -4530,7 +4530,7 @@ var ioe = ["none", "bone", "bwr", "cividis", "cool", "coolwarm", "gray", "hot",
|
|
|
4530
4530
|
if (!(i instanceof Error ? i.message : String(i)).includes("non-unsigned integers not yet supported")) throw i;
|
|
4531
4531
|
const { parseCOGTileMatrixSet: n, texture: r } = await import("@developmentseed/deck.gl-geotiff");
|
|
4532
4532
|
if (typeof n != "function" || typeof r?.inferTextureFormat != "function") throw i;
|
|
4533
|
-
const { fromUrl: s } = await import("./geotiff-
|
|
4533
|
+
const { fromUrl: s } = await import("./geotiff-DFHxtBMv.js"), { CreateTexture: a, FilterNoDataVal: l, MaskTexture: h } = await import("@developmentseed/deck.gl-raster/gpu-modules"), d = await import("./lib-CNQtqzfc.js"), p = d.default || d, g = this.props.geotiff, v = typeof g == "string" ? await s(g) : g, y = this.props.geoKeysParser, E = await n(v, y), S = await v.getImage(), R = await v.getImageCount(), I = [];
|
|
4534
4534
|
for (let ae = 0; ae < R; ae++) I.push(await v.getImage(ae));
|
|
4535
4535
|
const k = await y(S.getGeoKeys());
|
|
4536
4536
|
if (!k) throw new Error("Could not determine source projection from GeoTIFF geo keys");
|
|
@@ -8002,7 +8002,7 @@ var Ooe = [
|
|
|
8002
8002
|
this._state.loading = !0, this._state.error = null, this._state.status = null, this._render();
|
|
8003
8003
|
try {
|
|
8004
8004
|
await this._ensureOverlay();
|
|
8005
|
-
const { COGLayer: l } = await import("@developmentseed/deck.gl-geotiff"), { fromUrl: h } = await import("./geotiff-
|
|
8005
|
+
const { COGLayer: l } = await import("@developmentseed/deck.gl-geotiff"), { fromUrl: h } = await import("./geotiff-DFHxtBMv.js");
|
|
8006
8006
|
this._patchCOGLayer(l);
|
|
8007
8007
|
const d = `stac-${this._state.stacItem?.id || "layer"}-rgb-${this._layerCounter++}`, [p, g, v] = await Promise.all([
|
|
8008
8008
|
h(r.href),
|
|
@@ -8170,7 +8170,7 @@ var Ooe = [
|
|
|
8170
8170
|
e.prototype._parseGeoTIFF = async function() {
|
|
8171
8171
|
const { parseCOGTileMatrixSet: n, texture: r } = await import("@developmentseed/deck.gl-geotiff");
|
|
8172
8172
|
if (typeof n != "function" || typeof r?.inferTextureFormat != "function") return i.call(this);
|
|
8173
|
-
const { fromUrl: s } = await import("./geotiff-
|
|
8173
|
+
const { fromUrl: s } = await import("./geotiff-DFHxtBMv.js"), { CreateTexture: a, FilterNoDataVal: l, Colormap: h } = await import("@developmentseed/deck.gl-raster/gpu-modules"), d = await import("./lib-CNQtqzfc.js"), p = d.default || d, g = this.props.geotiff, v = typeof g == "string" ? await s(g) : g, y = this.props.geoKeysParser;
|
|
8174
8174
|
let E;
|
|
8175
8175
|
try {
|
|
8176
8176
|
E = await n(v, y);
|
|
@@ -9853,7 +9853,7 @@ var a9 = class {
|
|
|
9853
9853
|
throw new Error("CORS error: Unable to fetch the file. The server doesn't allow cross-origin requests.");
|
|
9854
9854
|
}
|
|
9855
9855
|
async _loadGeoParquet(e) {
|
|
9856
|
-
const { getDuckDBConverter: t } = await import("./DuckDBConverter-
|
|
9856
|
+
const { getDuckDBConverter: t } = await import("./DuckDBConverter-vGi-9-yB.js").then((a) => a.n), i = t(), n = await this._fetchWithCorsProxy(e);
|
|
9857
9857
|
let r;
|
|
9858
9858
|
try {
|
|
9859
9859
|
r = await n.arrayBuffer();
|
|
@@ -9897,7 +9897,7 @@ var a9 = class {
|
|
|
9897
9897
|
}
|
|
9898
9898
|
async _setupViewportLoading(e, t, i) {
|
|
9899
9899
|
if (!this._map) return;
|
|
9900
|
-
const { getDuckDBConverter: n } = await import("./DuckDBConverter-
|
|
9900
|
+
const { getDuckDBConverter: n } = await import("./DuckDBConverter-vGi-9-yB.js").then((a) => a.n), r = n(), s = `${e}.parquet`;
|
|
9901
9901
|
try {
|
|
9902
9902
|
await r.registerRemoteParquet(t, s);
|
|
9903
9903
|
const a = await r.getParquetSchema(s);
|
|
@@ -9926,7 +9926,7 @@ var a9 = class {
|
|
|
9926
9926
|
for (const n of t.layerIds) this._map.getLayer(n) && this._map.setLayoutProperty(n, "visibility", "visible");
|
|
9927
9927
|
this._viewportLoadingState.set(e, !0);
|
|
9928
9928
|
try {
|
|
9929
|
-
const { getDuckDBConverter: n } = await import("./DuckDBConverter-
|
|
9929
|
+
const { getDuckDBConverter: n } = await import("./DuckDBConverter-vGi-9-yB.js").then((d) => d.n), r = n(), s = this._map.getBounds(), a = [
|
|
9930
9930
|
s.getWest(),
|
|
9931
9931
|
s.getSouth(),
|
|
9932
9932
|
s.getEast(),
|
|
@@ -9941,7 +9941,7 @@ var a9 = class {
|
|
|
9941
9941
|
}
|
|
9942
9942
|
async _cleanupViewportLoading() {
|
|
9943
9943
|
if (this._map && this._viewportHandler && (this._map.off("moveend", this._viewportHandler), this._viewportHandler = void 0), this._viewportLoadingLayers.size > 0) try {
|
|
9944
|
-
const { getDuckDBConverter: e } = await import("./DuckDBConverter-
|
|
9944
|
+
const { getDuckDBConverter: e } = await import("./DuckDBConverter-vGi-9-yB.js").then((i) => i.n), t = e();
|
|
9945
9945
|
for (const i of this._viewportLoadingLayers) {
|
|
9946
9946
|
const n = this._vectorLayers.get(i);
|
|
9947
9947
|
n?.duckdbFileName && await t.unregisterFile(n.duckdbFileName);
|
|
@@ -9954,7 +9954,7 @@ var a9 = class {
|
|
|
9954
9954
|
const t = this._vectorLayers.get(e);
|
|
9955
9955
|
if (!(!t?.viewportLoading || !t.duckdbFileName)) {
|
|
9956
9956
|
try {
|
|
9957
|
-
const { getDuckDBConverter: i } = await import("./DuckDBConverter-
|
|
9957
|
+
const { getDuckDBConverter: i } = await import("./DuckDBConverter-vGi-9-yB.js").then((n) => n.n);
|
|
9958
9958
|
await i().unregisterFile(t.duckdbFileName);
|
|
9959
9959
|
} catch {
|
|
9960
9960
|
}
|
|
@@ -10828,7 +10828,7 @@ var ile = class {
|
|
|
10828
10828
|
throw new Error("CORS error: Unable to fetch the file. The server doesn't allow cross-origin requests.");
|
|
10829
10829
|
}
|
|
10830
10830
|
async _loadGeoParquet(e) {
|
|
10831
|
-
const { getDuckDBConverter: t } = await import("./DuckDBConverter-
|
|
10831
|
+
const { getDuckDBConverter: t } = await import("./DuckDBConverter-vGi-9-yB.js").then((a) => a.n), i = t(), n = await this._fetchWithCorsProxy(e);
|
|
10832
10832
|
let r;
|
|
10833
10833
|
try {
|
|
10834
10834
|
r = await n.arrayBuffer();
|
|
@@ -11040,6 +11040,36 @@ var ile = class {
|
|
|
11040
11040
|
colorbars: this._colorbarEntries.map((e) => ({ ...e }))
|
|
11041
11041
|
};
|
|
11042
11042
|
}
|
|
11043
|
+
setState(e) {
|
|
11044
|
+
this._map && this._colorbars.forEach((r) => {
|
|
11045
|
+
this._map.removeControl(r);
|
|
11046
|
+
});
|
|
11047
|
+
const t = (e.colorbars ?? []).map((r) => ({ ...r }));
|
|
11048
|
+
this._colorbars = [], this._colorbarEntries = t, this._map && t.forEach((r) => {
|
|
11049
|
+
const s = this._createColorbar(r);
|
|
11050
|
+
this._map.addControl(s, r.colorbarPosition), this._colorbars.push(s);
|
|
11051
|
+
});
|
|
11052
|
+
const i = typeof e.selectedColorbarIndex == "number" && e.selectedColorbarIndex >= 0 && e.selectedColorbarIndex < t.length ? e.selectedColorbarIndex : t.length > 0 ? t.length - 1 : -1, n = i >= 0 ? t[i] : {
|
|
11053
|
+
mode: e.mode ?? this._state.mode,
|
|
11054
|
+
colormap: e.colormap ?? this._state.colormap,
|
|
11055
|
+
customColors: e.customColors ?? this._state.customColors,
|
|
11056
|
+
vmin: e.vmin ?? this._state.vmin,
|
|
11057
|
+
vmax: e.vmax ?? this._state.vmax,
|
|
11058
|
+
label: e.label ?? this._state.label,
|
|
11059
|
+
units: e.units ?? this._state.units,
|
|
11060
|
+
orientation: e.orientation ?? this._state.orientation,
|
|
11061
|
+
colorbarPosition: e.colorbarPosition ?? this._state.colorbarPosition
|
|
11062
|
+
};
|
|
11063
|
+
return this._state = {
|
|
11064
|
+
...this._state,
|
|
11065
|
+
...n,
|
|
11066
|
+
visible: e.visible ?? this._state.visible,
|
|
11067
|
+
collapsed: e.collapsed ?? this._state.collapsed,
|
|
11068
|
+
hasColorbar: t.length > 0,
|
|
11069
|
+
selectedColorbarIndex: i,
|
|
11070
|
+
colorbars: t.map((r) => ({ ...r }))
|
|
11071
|
+
}, this._colorbar = i >= 0 ? this._colorbars[i] : void 0, this._applyEntryToForm(n), this._state.collapsed ? this._hidePanel() : this._showPanel(), this._container && (this._container.style.display = this._state.visible && this._zoomVisible ? "" : "none"), this._updateButtonStates(), this._emit("colorbarupdate"), this;
|
|
11072
|
+
}
|
|
11043
11073
|
_createContainer() {
|
|
11044
11074
|
const e = document.createElement("div");
|
|
11045
11075
|
return e.className = `maplibregl-ctrl maplibre-gl-colorbar-gui-control ${this._options.className}`, this._state.visible || (e.style.display = "none"), this._button = document.createElement("button"), this._button.type = "button", this._button.className = "colorbar-gui-button", this._button.title = "Colorbar", this._button.innerHTML = rle, this._button.addEventListener("click", () => this._togglePanel()), e.appendChild(this._button), e;
|
|
@@ -11380,6 +11410,37 @@ or #440154, #21918c, #fde725`, this._customColorsTextarea.addEventListener("inpu
|
|
|
11380
11410
|
}))
|
|
11381
11411
|
};
|
|
11382
11412
|
}
|
|
11413
|
+
setState(e) {
|
|
11414
|
+
this._map && this._legends.forEach((r) => {
|
|
11415
|
+
this._map.removeControl(r);
|
|
11416
|
+
});
|
|
11417
|
+
const t = (e.legends ?? []).map((r) => ({
|
|
11418
|
+
...r,
|
|
11419
|
+
items: r.items.map((s) => ({ ...s }))
|
|
11420
|
+
}));
|
|
11421
|
+
this._legends = [], this._legendEntries = t, this._map && t.forEach((r) => {
|
|
11422
|
+
const s = this._createLegend(r);
|
|
11423
|
+
this._map.addControl(s, r.legendPosition), this._legends.push(s);
|
|
11424
|
+
});
|
|
11425
|
+
const i = typeof e.selectedLegendIndex == "number" && e.selectedLegendIndex >= 0 && e.selectedLegendIndex < t.length ? e.selectedLegendIndex : t.length > 0 ? t.length - 1 : -1, n = i >= 0 ? t[i] : {
|
|
11426
|
+
title: e.title ?? this._state.title,
|
|
11427
|
+
items: (e.items ?? this._state.items).map((r) => ({ ...r })),
|
|
11428
|
+
legendPosition: e.legendPosition ?? this._state.legendPosition
|
|
11429
|
+
};
|
|
11430
|
+
return this._state = {
|
|
11431
|
+
...this._state,
|
|
11432
|
+
...n,
|
|
11433
|
+
items: n.items.map((r) => ({ ...r })),
|
|
11434
|
+
visible: e.visible ?? this._state.visible,
|
|
11435
|
+
collapsed: e.collapsed ?? this._state.collapsed,
|
|
11436
|
+
hasLegend: t.length > 0,
|
|
11437
|
+
selectedLegendIndex: i,
|
|
11438
|
+
legends: t.map((r) => ({
|
|
11439
|
+
...r,
|
|
11440
|
+
items: r.items.map((s) => ({ ...s }))
|
|
11441
|
+
}))
|
|
11442
|
+
}, this._legend = i >= 0 ? this._legends[i] : void 0, this._applyEntryToForm(n), this._state.collapsed ? this._hidePanel() : this._showPanel(), this._container && (this._container.style.display = this._state.visible && this._zoomVisible ? "" : "none"), this._updateButtonStates(), this._emit("legendupdate"), this;
|
|
11443
|
+
}
|
|
11383
11444
|
_createContainer() {
|
|
11384
11445
|
const e = document.createElement("div");
|
|
11385
11446
|
return e.className = `maplibregl-ctrl maplibre-gl-legend-gui-control ${this._options.className}`, this._state.visible || (e.style.display = "none"), this._button = document.createElement("button"), this._button.type = "button", this._button.className = "legend-gui-button", this._button.title = "Legend", this._button.innerHTML = lle, this._button.addEventListener("click", () => this._togglePanel()), e.appendChild(this._button), e;
|
|
@@ -11709,6 +11770,31 @@ or #440154, #21918c, #fde725`, this._customColorsTextarea.addEventListener("inpu
|
|
|
11709
11770
|
htmls: this._htmlEntries.map((e) => ({ ...e }))
|
|
11710
11771
|
};
|
|
11711
11772
|
}
|
|
11773
|
+
setState(e) {
|
|
11774
|
+
this._map && this._htmlControls.forEach((r) => {
|
|
11775
|
+
this._map.removeControl(r);
|
|
11776
|
+
});
|
|
11777
|
+
const t = (e.htmls ?? []).map((r) => ({ ...r }));
|
|
11778
|
+
this._htmlControls = [], this._htmlEntries = t, this._map && t.forEach((r) => {
|
|
11779
|
+
const s = this._createHtmlControl(r);
|
|
11780
|
+
this._map.addControl(s, r.htmlPosition), this._htmlControls.push(s);
|
|
11781
|
+
});
|
|
11782
|
+
const i = typeof e.selectedHtmlIndex == "number" && e.selectedHtmlIndex >= 0 && e.selectedHtmlIndex < t.length ? e.selectedHtmlIndex : t.length > 0 ? t.length - 1 : -1, n = i >= 0 ? t[i] : {
|
|
11783
|
+
title: e.title ?? this._state.title,
|
|
11784
|
+
html: e.html ?? this._state.html,
|
|
11785
|
+
htmlPosition: e.htmlPosition ?? this._state.htmlPosition,
|
|
11786
|
+
collapsible: e.collapsible ?? this._state.collapsible
|
|
11787
|
+
};
|
|
11788
|
+
return this._state = {
|
|
11789
|
+
...this._state,
|
|
11790
|
+
...n,
|
|
11791
|
+
visible: e.visible ?? this._state.visible,
|
|
11792
|
+
collapsed: e.collapsed ?? this._state.collapsed,
|
|
11793
|
+
hasHtmlControl: t.length > 0,
|
|
11794
|
+
selectedHtmlIndex: i,
|
|
11795
|
+
htmls: t.map((r) => ({ ...r }))
|
|
11796
|
+
}, this._htmlControl = i >= 0 ? this._htmlControls[i] : void 0, this._applyEntryToForm(n), this._state.collapsed ? this._hidePanel() : this._showPanel(), this._container && (this._container.style.display = this._state.visible && this._zoomVisible ? "" : "none"), this._updateButtonStates(), this._emit("htmlupdate"), this;
|
|
11797
|
+
}
|
|
11712
11798
|
_createContainer() {
|
|
11713
11799
|
const e = document.createElement("div");
|
|
11714
11800
|
return e.className = `maplibregl-ctrl maplibre-gl-html-gui-control ${this._options.className}`, this._state.visible || (e.style.display = "none"), this._button = document.createElement("button"), this._button.type = "button", this._button.className = "html-gui-button", this._button.title = "HTML Control", this._button.innerHTML = ple, this._button.addEventListener("click", () => this._togglePanel()), e.appendChild(this._button), e;
|
|
@@ -149850,7 +149936,9 @@ var XVe = {
|
|
|
149850
149936
|
DEV: !1,
|
|
149851
149937
|
MODE: "production",
|
|
149852
149938
|
PROD: !0,
|
|
149853
|
-
SSR: !1
|
|
149939
|
+
SSR: !1,
|
|
149940
|
+
VITE_GOOGLE_MAPS_API_KEY: "AIzaSyD_ENb1J0V4SCgrDyqcfsUnAOsnnchTGSQ",
|
|
149941
|
+
VITE_MAPILLARY_ACCESS_TOKEN: "MLY|26247951731495263|c9ef08c60e55c65ce764f479ee206de2"
|
|
149854
149942
|
}, i = t?.VITE_GOOGLE_MAPS_API_KEY, n = t?.VITE_MAPILLARY_ACCESS_TOKEN;
|
|
149855
149943
|
return new ZFe({
|
|
149856
149944
|
collapsed: !0,
|