maplibre-gl-raster 0.14.13 → 0.14.15
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-6TZSLwPL.js → RasterControl-Bymg9Jzw.js} +26 -8
- package/dist/{RasterControl-6TZSLwPL.js.map → RasterControl-Bymg9Jzw.js.map} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/react.d.ts +5 -0
- package/package.json +1 -1
|
@@ -17543,7 +17543,7 @@ function recoverCrsFromWktCitation(tiff) {
|
|
|
17543
17543
|
* shows up as multi-hundred-millisecond "Stalled" time per chunk in the
|
|
17544
17544
|
* Network panel — frequently *longer* than the actual network round-trip.
|
|
17545
17545
|
*
|
|
17546
|
-
* `cache:
|
|
17546
|
+
* `cache: 'no-store'` skips both reads and writes against that machinery.
|
|
17547
17547
|
* We don't lose anything: the @chunkd `SourceCache` middleware caches
|
|
17548
17548
|
* header chunks in memory, deck.gl's tile cache holds decoded tile data
|
|
17549
17549
|
* in JS heap, so the browser's disk cache was only ever helping on full
|
|
@@ -17593,11 +17593,21 @@ SourceHttp.fetch = (url, opts) => fetch(url, {
|
|
|
17593
17593
|
var CorsSafeSourceHttp = class extends SourceHttp {
|
|
17594
17594
|
async fetch(offset, length, options) {
|
|
17595
17595
|
const wasMetadata = this.metadata;
|
|
17596
|
-
|
|
17596
|
+
let result;
|
|
17597
|
+
try {
|
|
17598
|
+
result = await super.fetch(offset, length, options);
|
|
17599
|
+
} catch (error) {
|
|
17600
|
+
if (isRangeNotSatisfiable(error)) return /* @__PURE__ */ new ArrayBuffer(0);
|
|
17601
|
+
throw error;
|
|
17602
|
+
}
|
|
17597
17603
|
if (wasMetadata == null && this.metadata != null && length != null && this.metadata.size === length) this.metadata.size = void 0;
|
|
17598
17604
|
return result;
|
|
17599
17605
|
}
|
|
17600
17606
|
};
|
|
17607
|
+
/** Whether a fetch failed because its range started at or past end of file. */
|
|
17608
|
+
function isRangeNotSatisfiable(error) {
|
|
17609
|
+
return SourceError.is(error) && error.code === 416;
|
|
17610
|
+
}
|
|
17601
17611
|
var CHUNK_SIZE = 32 * 1024;
|
|
17602
17612
|
var CACHE_SIZE = 1024 * 1024;
|
|
17603
17613
|
var inflight = /* @__PURE__ */ new Map();
|
|
@@ -22633,6 +22643,13 @@ var PANEL_MIN_WIDTH = 260;
|
|
|
22633
22643
|
var PANEL_MIN_HEIGHT = 180;
|
|
22634
22644
|
/** Breathing room kept between a resized panel and the map edges. */
|
|
22635
22645
|
var PANEL_EDGE_MARGIN = 12;
|
|
22646
|
+
/** Corners a control can be docked in, as both engines name them. */
|
|
22647
|
+
var CONTROL_CORNERS = [
|
|
22648
|
+
"top-left",
|
|
22649
|
+
"top-right",
|
|
22650
|
+
"bottom-left",
|
|
22651
|
+
"bottom-right"
|
|
22652
|
+
];
|
|
22636
22653
|
/**
|
|
22637
22654
|
* A MapLibre GL control for visualizing local and remote raster datasets
|
|
22638
22655
|
* (GeoTIFF / Cloud Optimized GeoTIFF). A collapsible button expands into a
|
|
@@ -23298,16 +23315,17 @@ var RasterControl = class {
|
|
|
23298
23315
|
/**
|
|
23299
23316
|
* Detect which corner the control is positioned in.
|
|
23300
23317
|
*
|
|
23318
|
+
* Both class prefixes are recognised: a control added to a mapbox-gl map
|
|
23319
|
+
* lands in a `mapboxgl-ctrl-*` corner rather than a `maplibregl-ctrl-*` one,
|
|
23320
|
+
* and reading only the MapLibre class would anchor the panel to the default
|
|
23321
|
+
* top-right — on top of whatever else sits in that corner.
|
|
23322
|
+
*
|
|
23301
23323
|
* @returns The position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
|
|
23302
23324
|
*/
|
|
23303
23325
|
_getControlPosition() {
|
|
23304
23326
|
const parent = this._container?.parentElement;
|
|
23305
23327
|
if (!parent) return "top-right";
|
|
23306
|
-
|
|
23307
|
-
if (parent.classList.contains("maplibregl-ctrl-top-right")) return "top-right";
|
|
23308
|
-
if (parent.classList.contains("maplibregl-ctrl-bottom-left")) return "bottom-left";
|
|
23309
|
-
if (parent.classList.contains("maplibregl-ctrl-bottom-right")) return "bottom-right";
|
|
23310
|
-
return "top-right";
|
|
23328
|
+
return CONTROL_CORNERS.find((name) => parent.classList.contains(`maplibregl-ctrl-${name}`) || parent.classList.contains(`mapboxgl-ctrl-${name}`)) ?? "top-right";
|
|
23311
23329
|
}
|
|
23312
23330
|
/**
|
|
23313
23331
|
* Update the panel position based on button location and control corner.
|
|
@@ -23358,4 +23376,4 @@ var RasterControl = class {
|
|
|
23358
23376
|
//#endregion
|
|
23359
23377
|
export { PlanarConfiguration as $, TITILER_TMS as A, colormapDisplayName as B, VrtUnsupportedError as C, parseVrt as D, loadVrt as E, sampleColormapStops as F, MAX_SAMPLE_TILES as G, DEFAULT_INDEX_RANGE as H, COLORMAP_DISPLAY_NAMES as I, mergeBandStats as J, computeAutoStats as K, COLORMAP_NAMES as L, PALETTE_COLORMAP as M, isKnownColormap as N, loadGeoTIFF as O, loadColormapSprite as P, Photometric as Q, COLORMAP_OPTIONS as R, throttle as S, isVrtUrl as T, autoRangeFor as U, colormaps_default as V, statsForBand as W, readBandNames as X, percentileFromHistogram as Y, Compression as Z, clamp as _, NORMALIZED_DIFFERENCE_INDICES as a, createResilientEpsgResolver as at, formatNumericValue as b, DEFAULT_ENGINE as c, MosaicUnsupportedError as d, Predictor as et, assetUrlToHttps as f, parseMosaic as g, mosaicMinZoom as h, CUSTOM_NORMALIZED_DIFFERENCE as i, readRasterWindow as it, isMosaicJsonUrl as j, DEFAULT_TITILER_ENDPOINT as k, LayerManager as l, mosaicInitialView as m, Colorbar as n, TiffTag as nt, guessBandForRole as o, loadMosaic as p, mergeAutoStats as q, CUSTOM_INDEX_ID as r, readPixelValues as rt, indexById as s, RasterControl as t, SampleFormat as tt, MAX_MOSAIC_ASSETS as u, classNames as v, isVrtFile as w, generateId as x, debounce as y, COLORMAP_ROW_COUNT as z };
|
|
23360
23378
|
|
|
23361
|
-
//# sourceMappingURL=RasterControl-
|
|
23379
|
+
//# sourceMappingURL=RasterControl-Bymg9Jzw.js.map
|