mobility-toolbox-js 2.0.0-beta.82 → 2.0.0-beta.83

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/mbt.js CHANGED
@@ -57512,6 +57512,8 @@ uniform ${i3} ${o3} u_${a3};
57512
57512
  return !!this.styleLayers?.find((sl) => styleLayer.id === sl.id);
57513
57513
  };
57514
57514
  }
57515
+ this.maxZoom = options.maxZoom;
57516
+ this.minZoom = options.minZoom;
57515
57517
  }
57516
57518
  /**
57517
57519
  * Initialize the layer.
@@ -57750,6 +57752,13 @@ uniform ${i3} ${o3} u_${a3};
57750
57752
  "visibility",
57751
57753
  visibilityValue
57752
57754
  );
57755
+ if (this.minZoom || this.maxZoom) {
57756
+ mbMap.setLayerZoomRange(
57757
+ styleLayer.id,
57758
+ this.minZoom ? this.minZoom - 1 : 0,
57759
+ this.maxZoom ? this.maxZoom - 1 : 0
57760
+ );
57761
+ }
57753
57762
  }
57754
57763
  }
57755
57764
  }