maplibre-gl-raster 0.6.2 → 0.6.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.
@@ -18369,6 +18369,7 @@ var LayerManager = class {
18369
18369
  try {
18370
18370
  const tiff = await this._deps.loadGeoTIFF(url);
18371
18371
  if (this._destroyed || !this.getLayer(layer.id)) return layer.id;
18372
+ if (!tiff.isTiled) throw new Error("This GeoTIFF is striped, not tiled, so it cannot be streamed as map tiles. Convert it to a tiled Cloud-Optimized GeoTIFF (COG) first, for example with `rio cogeo create input.tif output.tif` or `gdal_translate input.tif output.tif -of COG`, then load the result.");
18372
18373
  layer.geotiff = tiff;
18373
18374
  layer.bandCount = tiff.count;
18374
18375
  layer.bandNames = readBandNames(tiff);
@@ -19137,6 +19138,7 @@ var AddDataSection = class {
19137
19138
  trigger.focus();
19138
19139
  input.value = sample.url;
19139
19140
  loadBtn.disabled = input.value.trim().length === 0;
19141
+ submitUrl();
19140
19142
  });
19141
19143
  menu.appendChild(option);
19142
19144
  }
@@ -19195,7 +19197,7 @@ var AddDataSection = class {
19195
19197
  this.el = el("div", { className: "mlr-section mlr-add-data" }, el("div", {
19196
19198
  className: "mlr-section-title",
19197
19199
  text: "Add data"
19198
- }), ...sampleRow ? [sampleRow] : [], urlRow, dropZone, beforeIdInput);
19200
+ }), urlRow, dropZone, beforeIdInput, ...sampleRow ? [sampleRow] : []);
19199
19201
  }
19200
19202
  };
19201
19203
  //#endregion
@@ -19210,6 +19212,7 @@ var EngineSection = class {
19210
19212
  /** Root element to insert into the panel. */
19211
19213
  el;
19212
19214
  _select;
19215
+ _help;
19213
19216
  constructor(options) {
19214
19217
  this._select = select([{
19215
19218
  value: "maplibre-gl-raster",
@@ -19220,10 +19223,29 @@ var EngineSection = class {
19220
19223
  }], options.value, (next) => options.onChange(next), "render-engine");
19221
19224
  const title = el("span", {
19222
19225
  className: "mlr-section-title",
19223
- text: "Rendering engine",
19224
- title: HELP$1
19226
+ text: "Rendering engine"
19225
19227
  });
19226
- this.el = el("div", { className: "mlr-section mlr-engine" }, title, this._select);
19228
+ const helpButton = el("button", {
19229
+ className: "mlr-info-button",
19230
+ type: "button",
19231
+ text: "i",
19232
+ title: HELP$1,
19233
+ ariaLabel: "Rendering engine help",
19234
+ attrs: { "aria-expanded": "false" }
19235
+ });
19236
+ this._help = el("div", {
19237
+ className: "mlr-tooltip",
19238
+ text: HELP$1,
19239
+ attrs: { role: "tooltip" }
19240
+ });
19241
+ this._help.hidden = true;
19242
+ const setHelpOpen = (open) => {
19243
+ this._help.hidden = !open;
19244
+ helpButton.setAttribute("aria-expanded", String(open));
19245
+ };
19246
+ helpButton.addEventListener("click", () => setHelpOpen(this._help.hidden === true));
19247
+ helpButton.addEventListener("blur", () => setHelpOpen(false));
19248
+ this.el = el("div", { className: "mlr-section mlr-engine" }, el("div", { className: "mlr-section-title-row" }, title, helpButton), this._help, this._select);
19227
19249
  }
19228
19250
  /** Reflects the active engine on the select (e.g. after a programmatic
19229
19251
  * change). */
@@ -21117,4 +21139,4 @@ var RasterControl = class {
21117
21139
  //#endregion
21118
21140
  export { MAX_SAMPLE_TILES as C, createResilientEpsgResolver as D, readBandNames as E, statsForBand as S, percentileFromHistogram as T, COLORMAP_OPTIONS as _, isKnownColormap as a, colormaps_default as b, clamp as c, formatNumericValue as d, generateId as f, COLORMAP_NAMES as g, COLORMAP_DISPLAY_NAMES as h, PALETTE_COLORMAP as i, classNames as l, loadGeoTIFF as m, Colorbar as n, loadColormapSprite as o, throttle as p, readPixelValues as r, sampleColormapStops as s, RasterControl as t, debounce as u, COLORMAP_ROW_COUNT as v, computeAutoStats as w, autoRangeFor as x, colormapDisplayName as y };
21119
21141
 
21120
- //# sourceMappingURL=RasterControl-CjnDWQDU.js.map
21142
+ //# sourceMappingURL=RasterControl-DlL9R4uH.js.map