@nextgis/leaflet-map-adapter 3.0.0-alpha.17 → 3.0.0-alpha.19

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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/leaflet-map-adapter; version: 3.0.0-alpha.13; author: NextGIS */
1
+ /** Bundle of @nextgis/leaflet-map-adapter; version: 3.0.0-alpha.18; author: NextGIS */
2
2
  var domain;
3
3
 
4
4
  // This constructor is used to store event handlers. Instantiating this is
@@ -14653,6 +14653,10 @@ function defined(val) {
14653
14653
  return val !== void 0 && val !== null;
14654
14654
  }
14655
14655
 
14656
+ function isObject(val) {
14657
+ return Object.prototype.toString.call(val) === "[object Object]";
14658
+ }
14659
+
14656
14660
  function updateUrlParams(urlStr, params) {
14657
14661
  const url = new URL(urlStr);
14658
14662
  const searchParams = new URLSearchParams(url.search);
@@ -15835,7 +15839,6 @@ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key,
15835
15839
  var __publicField$2 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
15836
15840
  class ImageLayer extends leafletSrcExports.Layer {
15837
15841
  constructor(url, options) {
15838
- var _a;
15839
15842
  super(options);
15840
15843
  __publicField$2(this, "defaultWmsParams", {
15841
15844
  service: "WMS",
@@ -15870,18 +15873,21 @@ class ImageLayer extends leafletSrcExports.Layer {
15870
15873
  const opts = {};
15871
15874
  let opt;
15872
15875
  for (opt in options) {
15876
+ const val = options[opt];
15873
15877
  if (opt in this.options) {
15874
- opts[opt] = options[opt];
15875
- } else {
15876
- params[opt] = options[opt];
15878
+ opts[opt] = val;
15879
+ }
15880
+ }
15881
+ if (options.params) {
15882
+ for (const param in options.params) {
15883
+ const val = options.params[param];
15884
+ if (!isObject(val) && !Array.isArray(val) && typeof val !== "function") {
15885
+ params[param] = val;
15886
+ }
15877
15887
  }
15878
15888
  }
15879
15889
  leafletSrcExports.Util.setOptions(this, opts);
15880
- this.wmsParams = leafletSrcExports.Util.extend(
15881
- {},
15882
- this.defaultWmsParams,
15883
- (_a = params == null ? void 0 : params.params) != null ? _a : {}
15884
- );
15890
+ this.wmsParams = leafletSrcExports.Util.extend({}, this.defaultWmsParams, params);
15885
15891
  }
15886
15892
  setParams(params) {
15887
15893
  leafletSrcExports.Util.extend(this.wmsParams, params);