maplibre-gl-raster 0.2.3 → 0.2.4
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/{RasterControl-COXL7MI-.js → RasterControl-BAv4x6Eg.js} +32 -1
- package/dist/{RasterControl-COXL7MI-.js.map → RasterControl-BAv4x6Eg.js.map} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/types/index.d.ts +9 -0
- package/dist/types/react.d.ts +9 -0
- package/package.json +1 -1
|
@@ -17682,6 +17682,26 @@ var LayerManager = class {
|
|
|
17682
17682
|
});
|
|
17683
17683
|
}
|
|
17684
17684
|
/**
|
|
17685
|
+
* Sets the MapLibre layer a raster draws beneath (interleaved mode).
|
|
17686
|
+
*
|
|
17687
|
+
* In interleaved rendering, @deck.gl/mapbox groups raster layers by their
|
|
17688
|
+
* `beforeId`: a layer with no `beforeId` is drawn on top of the whole style,
|
|
17689
|
+
* so a host that interleaves rasters with its own vector layers calls this to
|
|
17690
|
+
* place a raster below a given vector layer. A no-op when the id is unchanged.
|
|
17691
|
+
*
|
|
17692
|
+
* @param id - The layer id
|
|
17693
|
+
* @param beforeId - The MapLibre style layer id to draw beneath, or null/empty
|
|
17694
|
+
* to draw the raster on top.
|
|
17695
|
+
*/
|
|
17696
|
+
setBeforeId(id, beforeId) {
|
|
17697
|
+
const layer = this.getLayer(id);
|
|
17698
|
+
if (!layer) return;
|
|
17699
|
+
const normalized = beforeId?.trim() || null;
|
|
17700
|
+
if (layer.beforeId === normalized) return;
|
|
17701
|
+
layer.beforeId = normalized;
|
|
17702
|
+
this._rebuild();
|
|
17703
|
+
}
|
|
17704
|
+
/**
|
|
17685
17705
|
* Registers an event handler.
|
|
17686
17706
|
*
|
|
17687
17707
|
* @param event - Event type
|
|
@@ -19578,6 +19598,17 @@ var RasterControl = class {
|
|
|
19578
19598
|
reorderRaster(id, toIndex) {
|
|
19579
19599
|
this._layerManager?.reorder(id, toIndex);
|
|
19580
19600
|
}
|
|
19601
|
+
/**
|
|
19602
|
+
* Sets the MapLibre layer a raster draws beneath (interleaved mode), so a host
|
|
19603
|
+
* can interleave rasters with its own vector layers. Pass null to draw the
|
|
19604
|
+
* raster on top. See {@link import('../state/LayerManager').LayerManager.setBeforeId}.
|
|
19605
|
+
*
|
|
19606
|
+
* @param id - The layer id
|
|
19607
|
+
* @param beforeId - The MapLibre style layer id to draw beneath, or null
|
|
19608
|
+
*/
|
|
19609
|
+
setRasterBeforeId(id, beforeId) {
|
|
19610
|
+
this._layerManager?.setBeforeId(id, beforeId);
|
|
19611
|
+
}
|
|
19581
19612
|
/** Re-emits LayerManager events through the control's event system. */
|
|
19582
19613
|
_forwardLayerManagerEvents(manager) {
|
|
19583
19614
|
for (const type of [
|
|
@@ -19744,4 +19775,4 @@ var RasterControl = class {
|
|
|
19744
19775
|
//#endregion
|
|
19745
19776
|
export { colormaps_default as _, debounce as a, throttle as c, percentileFromHistogram as d, readBandNames as f, COLORMAP_ROW_COUNT as g, COLORMAP_OPTIONS as h, classNames as i, MAX_SAMPLE_TILES as l, COLORMAP_NAMES as m, PALETTE_COLORMAP as n, formatNumericValue as o, loadGeoTIFF as p, clamp as r, generateId as s, RasterControl as t, computeAutoStats as u, createResilientEpsgResolver as v };
|
|
19746
19777
|
|
|
19747
|
-
//# sourceMappingURL=RasterControl-
|
|
19778
|
+
//# sourceMappingURL=RasterControl-BAv4x6Eg.js.map
|