@focusbc/bbs-lib 0.0.6 → 0.0.9

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.
@@ -78664,6 +78664,7 @@ var MapOverlay = class _MapOverlay {
78664
78664
  constructor(htmlElement, context, options = {}) {
78665
78665
  this._levelId = null;
78666
78666
  this._surroundings = false;
78667
+ this._blueprint = true;
78667
78668
  this._shapes = [];
78668
78669
  this._selectedShapeId = null;
78669
78670
  this._editMode = false;
@@ -78704,7 +78705,7 @@ var MapOverlay = class _MapOverlay {
78704
78705
  });
78705
78706
  };
78706
78707
  const { zoom, heading, tilt } = options;
78707
- const { center: center3, defaultLevelId } = context;
78708
+ const { center: center3, defaultLevelId, rotation } = context;
78708
78709
  this._context = context;
78709
78710
  this._htmlElement = htmlElement;
78710
78711
  this._levelId = defaultLevelId;
@@ -78712,7 +78713,7 @@ var MapOverlay = class _MapOverlay {
78712
78713
  zoom: zoom ?? DEFAULT_ZOOM,
78713
78714
  latitude: center3?.lat ?? 0,
78714
78715
  longitude: center3?.lng ?? 0,
78715
- bearing: heading ?? 0,
78716
+ bearing: (heading || rotation) ?? 0,
78716
78717
  pitch: tilt ?? 0,
78717
78718
  maxZoom: MAX_ZOOM
78718
78719
  };
@@ -78751,10 +78752,12 @@ var MapOverlay = class _MapOverlay {
78751
78752
  this._zoomChangedEvent.emit(this._viewState.zoom ?? DEFAULT_ZOOM);
78752
78753
  }
78753
78754
  createLayers() {
78754
- return [
78755
- new OverlayDynamicLayerBuilder(this._shapes).setSelectedShapeId(this._selectedShapeId).setEdit(this._editMode).setOnSelect(this.onClick.bind(this)).setOnEdit(this.onEdit.bind(this)).build(),
78756
- ...new OverlayStaticLayerBuilder(this._context.apiUrl, this._context.apiKey, this._levelId).setLayers(this._context.staticLayers).setSurroundings(this._surroundings).build()
78757
- ];
78755
+ let staticLayers = [];
78756
+ const dynamicLayer = new OverlayDynamicLayerBuilder(this._shapes).setSelectedShapeId(this._selectedShapeId).setEdit(this._editMode).setOnSelect(this.onClick.bind(this)).setOnEdit(this.onEdit.bind(this)).build();
78757
+ if (this._blueprint) {
78758
+ staticLayers = new OverlayStaticLayerBuilder(this._context.apiUrl, this._context.apiKey, this._levelId).setLayers(this._context.staticLayers).setSurroundings(this._surroundings).build();
78759
+ }
78760
+ return [dynamicLayer, ...staticLayers];
78758
78761
  }
78759
78762
  rebuildLayers() {
78760
78763
  this._deck.setProps({ layers: this.createLayers() });
@@ -78872,13 +78875,14 @@ var MapOverlay = class _MapOverlay {
78872
78875
  }
78873
78876
  //#region Getters and Setters
78874
78877
  setContext(context) {
78875
- const { center: center3, defaultLevelId } = context;
78878
+ const { center: center3, defaultLevelId, rotation } = context;
78876
78879
  this._context = context;
78877
78880
  this._levelId = defaultLevelId;
78878
78881
  this._viewState = {
78879
78882
  ...this._viewState,
78880
78883
  latitude: center3.lat ?? 0,
78881
- longitude: center3.lng ?? 0
78884
+ longitude: center3.lng ?? 0,
78885
+ bearing: rotation ?? this._viewState.bearing ?? 0
78882
78886
  };
78883
78887
  this._deck.setProps({ viewState: this._viewState });
78884
78888
  this.rebuildLayers();
@@ -78894,6 +78898,13 @@ var MapOverlay = class _MapOverlay {
78894
78898
  this._surroundings = active;
78895
78899
  this.rebuildLayers();
78896
78900
  }
78901
+ getBlueprint() {
78902
+ return this._blueprint;
78903
+ }
78904
+ setBlueprint(active) {
78905
+ this._blueprint = active;
78906
+ this.rebuildLayers();
78907
+ }
78897
78908
  getLevelId() {
78898
78909
  return this._levelId;
78899
78910
  }