maplibre-gl-raster 0.14.12 → 0.14.14
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/README.md +1 -1
- package/dist/{RasterControl-5Xo2rM_m.js → RasterControl-BlJnbnow.js} +14 -7
- package/dist/{RasterControl-5Xo2rM_m.js.map → RasterControl-BlJnbnow.js.map} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/types/index.d.ts +7 -2
- package/dist/types/react.d.ts +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,7 +117,7 @@ The main control class implementing MapLibre's `IControl` interface.
|
|
|
117
117
|
| `interleaved` | `boolean` | `true` | Render the deck.gl overlay interleaved with the basemap layers |
|
|
118
118
|
| `defaultUrl` | `string` | `''` | Prefills the Add data URL input (not loaded until the user clicks Load) |
|
|
119
119
|
| `autoLoad` | `boolean` | `false` | Load `defaultUrl` automatically when the control is added to the map |
|
|
120
|
-
| `sampleData` | `RasterSampleDataset[]` | - | Sample COGs offered as a "Load sample data" dropdown
|
|
120
|
+
| `sampleData` | `RasterSampleDataset[]` | - | Sample COGs offered as a "Load sample data" dropdown below the Add data inputs; picking one fills the URL (and attribution) input, not loaded until the user clicks Load (hidden when empty) |
|
|
121
121
|
| `sampleDataLabel` | `string` | `'Load sample data...'` | Placeholder shown in the sample-data dropdown |
|
|
122
122
|
| `closeOnOutsideClick` | `boolean` | `true` | Collapse the panel when clicking outside it; set `false` to close only via the header button |
|
|
123
123
|
| `engine` | `RenderEngine` | `'maplibre-gl-raster'` | Initial rendering backend; switchable at runtime from the panel |
|
|
@@ -21054,7 +21054,6 @@ var AddDataSection = class {
|
|
|
21054
21054
|
input.value = sample.url;
|
|
21055
21055
|
if (sample.attribution) attributionInput.value = sample.attribution;
|
|
21056
21056
|
loadBtn.disabled = input.value.trim().length === 0;
|
|
21057
|
-
submitUrl();
|
|
21058
21057
|
});
|
|
21059
21058
|
menu.appendChild(option);
|
|
21060
21059
|
}
|
|
@@ -22634,6 +22633,13 @@ var PANEL_MIN_WIDTH = 260;
|
|
|
22634
22633
|
var PANEL_MIN_HEIGHT = 180;
|
|
22635
22634
|
/** Breathing room kept between a resized panel and the map edges. */
|
|
22636
22635
|
var PANEL_EDGE_MARGIN = 12;
|
|
22636
|
+
/** Corners a control can be docked in, as both engines name them. */
|
|
22637
|
+
var CONTROL_CORNERS = [
|
|
22638
|
+
"top-left",
|
|
22639
|
+
"top-right",
|
|
22640
|
+
"bottom-left",
|
|
22641
|
+
"bottom-right"
|
|
22642
|
+
];
|
|
22637
22643
|
/**
|
|
22638
22644
|
* A MapLibre GL control for visualizing local and remote raster datasets
|
|
22639
22645
|
* (GeoTIFF / Cloud Optimized GeoTIFF). A collapsible button expands into a
|
|
@@ -23299,16 +23305,17 @@ var RasterControl = class {
|
|
|
23299
23305
|
/**
|
|
23300
23306
|
* Detect which corner the control is positioned in.
|
|
23301
23307
|
*
|
|
23308
|
+
* Both class prefixes are recognised: a control added to a mapbox-gl map
|
|
23309
|
+
* lands in a `mapboxgl-ctrl-*` corner rather than a `maplibregl-ctrl-*` one,
|
|
23310
|
+
* and reading only the MapLibre class would anchor the panel to the default
|
|
23311
|
+
* top-right — on top of whatever else sits in that corner.
|
|
23312
|
+
*
|
|
23302
23313
|
* @returns The position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
|
|
23303
23314
|
*/
|
|
23304
23315
|
_getControlPosition() {
|
|
23305
23316
|
const parent = this._container?.parentElement;
|
|
23306
23317
|
if (!parent) return "top-right";
|
|
23307
|
-
|
|
23308
|
-
if (parent.classList.contains("maplibregl-ctrl-top-right")) return "top-right";
|
|
23309
|
-
if (parent.classList.contains("maplibregl-ctrl-bottom-left")) return "bottom-left";
|
|
23310
|
-
if (parent.classList.contains("maplibregl-ctrl-bottom-right")) return "bottom-right";
|
|
23311
|
-
return "top-right";
|
|
23318
|
+
return CONTROL_CORNERS.find((name) => parent.classList.contains(`maplibregl-ctrl-${name}`) || parent.classList.contains(`mapboxgl-ctrl-${name}`)) ?? "top-right";
|
|
23312
23319
|
}
|
|
23313
23320
|
/**
|
|
23314
23321
|
* Update the panel position based on button location and control corner.
|
|
@@ -23359,4 +23366,4 @@ var RasterControl = class {
|
|
|
23359
23366
|
//#endregion
|
|
23360
23367
|
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 };
|
|
23361
23368
|
|
|
23362
|
-
//# sourceMappingURL=RasterControl-
|
|
23369
|
+
//# sourceMappingURL=RasterControl-BlJnbnow.js.map
|