mobility-toolbox-js 3.0.1-beta.5 → 3.0.1-beta.7

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
@@ -45998,6 +45998,11 @@ uniform ${i3} ${a3} u_${s3};
45998
45998
  detachFromMap() {
45999
45999
  unByKey(this.olEventsKeys);
46000
46000
  }
46001
+ disposeInternal() {
46002
+ const source = this.getSource();
46003
+ super.disposeInternal();
46004
+ this.setSource(source);
46005
+ }
46001
46006
  getStyle() {
46002
46007
  if (this.style && typeof this.style === "object" && this.style.name && this.style.version) {
46003
46008
  return this.style;
@@ -46312,21 +46317,10 @@ uniform ${i3} ${a3} u_${s3};
46312
46317
  * @override
46313
46318
  */
46314
46319
  attachToMap(map) {
46315
- if (this.maplibreLayer && !this.maplibreLayer.getMapInternal()) {
46316
- map.addLayer(this.maplibreLayer);
46317
- }
46318
46320
  const mapInternal = this.getMapInternal();
46319
46321
  if (!mapInternal || !this.maplibreLayer) {
46320
46322
  return;
46321
46323
  }
46322
- if (!mapInternal.getTargetElement()) {
46323
- this.olEventsKeys.push(
46324
- mapInternal.on("change:target", () => {
46325
- this.attachToMap(map);
46326
- })
46327
- );
46328
- return;
46329
- }
46330
46324
  const { mapLibreMap } = this.maplibreLayer;
46331
46325
  if (mapLibreMap) {
46332
46326
  if (mapLibreMap.loaded()) {