@artstesh/maps 9.1.0-alpha.2 → 9.1.1

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.
@@ -2891,6 +2891,14 @@ class GeotiffTileLayerSettings {
2891
2891
  * @type {number|undefined}
2892
2892
  */
2893
2893
  blockSize = undefined;
2894
+ /**
2895
+ * By default, the source data is normalized to values between 0 and 1 with scaling factors based on the raster statistics or min and max properties of each source. If instead you want to work with the raw values in a style expression, set this to false. Setting this option to false will make it so any min and max properties on sources are ignored.
2896
+ */
2897
+ normalize = true;
2898
+ /**
2899
+ * Values to discard (overriding any nodata values in the metadata). When provided, an additional alpha band will be added to the data. Often the GeoTIFF metadata will include information about nodata values, so you should only need to set this property if you find that it is not already extracted from the metadata.
2900
+ */
2901
+ nodata;
2894
2902
  /**
2895
2903
  * Creates a copy of the given tile layer settings.
2896
2904
  *
@@ -2906,6 +2914,8 @@ class GeotiffTileLayerSettings {
2906
2914
  result.blockSize = model.blockSize;
2907
2915
  result.opacity = model.opacity;
2908
2916
  result.url = model.url;
2917
+ result.normalize = model.normalize;
2918
+ result.nodata = model.nodata;
2909
2919
  return result;
2910
2920
  }
2911
2921
  /**
@@ -2917,6 +2927,18 @@ class GeotiffTileLayerSettings {
2917
2927
  setUrl(url) {
2918
2928
  return GeotiffTileLayerSettings.copy({ ...this, url });
2919
2929
  }
2930
+ setNodata(nodata) {
2931
+ return GeotiffTileLayerSettings.copy({ ...this, nodata });
2932
+ }
2933
+ /**
2934
+ * Sets the normalize property for the GeotiffTileLayerSettings instance.
2935
+ *
2936
+ * @param {boolean} normalize - Indicates whether the normalization setting should be enabled or disabled.
2937
+ * @return {GeotiffTileLayerSettings} A new instance of GeotiffTileLayerSettings with the updated normalize property.
2938
+ */
2939
+ setNormalize(normalize) {
2940
+ return GeotiffTileLayerSettings.copy({ ...this, normalize });
2941
+ }
2920
2942
  /**
2921
2943
  * Updates the style settings for the GeotiffTileLayerSettings and returns a new instance with the updated style.
2922
2944
  *
@@ -2992,6 +3014,10 @@ class GeotiffTileLayerSettings {
2992
3014
  return false;
2993
3015
  if (this.opacity !== model.opacity)
2994
3016
  return false;
3017
+ if (this.normalize !== model.normalize)
3018
+ return false;
3019
+ if (this.nodata !== model.nodata)
3020
+ return false;
2995
3021
  return true;
2996
3022
  }
2997
3023
  }
@@ -3004,8 +3030,11 @@ class GeotiffTileLayerFactory {
3004
3030
  url: settings.url,
3005
3031
  min: settings.min,
3006
3032
  max: settings.max,
3033
+ nodata: settings.nodata,
3007
3034
  },
3008
- ], sourceOptions: { blockSize: settings.blockSize }
3035
+ ],
3036
+ sourceOptions: { blockSize: settings.blockSize },
3037
+ normalize: settings.normalize,
3009
3038
  });
3010
3039
  return new TileLayer$1({
3011
3040
  style: settings.style,