@mapvx/web-components 0.0.10 → 0.0.12

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.
Files changed (33) hide show
  1. package/dist/cjs/accessibility-DWoi6we_.cjs +1 -0
  2. package/dist/cjs/back_arrow-Cb1GjmUe.cjs +1 -0
  3. package/dist/cjs/{consume-CF9Nl-_6.cjs → consume-CPM4m4jx.cjs} +2 -1
  4. package/dist/cjs/{custom-map-Cp8s6dlU.cjs → custom-map-DoulPY8x.cjs} +2 -1
  5. package/dist/cjs/{floor-selector-DZ98TkJN.cjs → floor-selector-1YFLwXXn.cjs} +2 -1
  6. package/dist/cjs/icon-destination-point-C8Bl9rvO.cjs +1 -0
  7. package/dist/cjs/icon-origin-point-B0FLE42C.cjs +1 -0
  8. package/dist/cjs/index.cjs +1 -0
  9. package/dist/cjs/{lazy-load-mXPBVkc2.cjs → lazy-load-DEPtHljo.cjs} +4 -3
  10. package/dist/cjs/map-view-with-modal.cjs +2 -1
  11. package/dist/cjs/maplibre-gl-P-Xd6Hdn.cjs +1 -0
  12. package/dist/cjs/{qr-modal-B3891leb.cjs → qr-modal-CMstRY6z.cjs} +2 -1
  13. package/dist/cjs/repeat_icon-DBYc7GBB.cjs +1 -0
  14. package/dist/cjs/{route-options-jHrLE3py.cjs → route-options-2AIdvAGW.cjs} +2 -1
  15. package/dist/cjs/route-view-totems.cjs +4 -3
  16. package/dist/cjs/walking-CDbgxjU4.cjs +1 -0
  17. package/dist/es/assets/accessibility-Cnj-vwGM.js +1 -0
  18. package/dist/es/assets/back_arrow-CUOAm8Zc.js +1 -0
  19. package/dist/es/assets/{components-CmLrNgNd.js → components-WD5664Tb.js} +12 -7
  20. package/dist/es/assets/icon-destination-point-DY-ha1KN.js +1 -0
  21. package/dist/es/assets/icon-origin-point-v4_9Pmls.js +1 -0
  22. package/dist/es/assets/{map-view-with-modal-IvUfNe7W.js → map-view-with-modal-9SejcmCD.js} +3 -2
  23. package/dist/es/assets/maplibre-gl-KgJ_zm92.js +1 -0
  24. package/dist/es/assets/repeat_icon-CY61-fSZ.js +1 -0
  25. package/dist/es/assets/{route-view-totems-CDO--Lnp.js → route-view-totems-B6XNhVcN.js} +38 -13
  26. package/dist/es/assets/{utils-CJunqWTb.js → utils-CL_wN9yE.js} +140 -216
  27. package/dist/es/assets/walking-BmgeFukv.js +1 -0
  28. package/dist/es/index.js +3 -2
  29. package/dist/es/route-view-totems.js +3 -2
  30. package/dist/iife/map-view-with-modal.js +3 -2
  31. package/dist/iife/route-view-totems.js +5 -4
  32. package/package.json +6 -2
  33. package/dist/update-timestamp.txt +0 -1
@@ -1,5 +1,5 @@
1
- import { i, s as sdkContext } from './components-CmLrNgNd.js';
2
- import { R as RollbarController } from './route-view-totems-CDO--Lnp.js';
1
+ import { i, s as sdkContext } from './components-WD5664Tb.js';
2
+ import { R as RollbarController } from './route-view-totems-B6XNhVcN.js';
3
3
 
4
4
  var dist = {exports: {}};
5
5
 
@@ -5900,12 +5900,13 @@ function requireDist () {
5900
5900
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
5901
5901
  function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: true, configurable: true } }), Object.defineProperty(t, "prototype", { writable: false }), e && _setPrototypeOf(t, e); }
5902
5902
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
5903
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
5903
5904
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
5904
5905
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
5905
5906
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
5906
5907
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; }
5907
5908
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
5908
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
5909
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5909
5910
 
5910
5911
 
5911
5912
  /**
@@ -5965,8 +5966,8 @@ function requireDist () {
5965
5966
  var _markerContainer$getE, _iconContainer$height, _iconContainer$width;
5966
5967
  markerContainer.appendChild(marker.element);
5967
5968
  var iconContainer = (_markerContainer$getE = markerContainer.getElementsByTagName("img")) === null || _markerContainer$getE === void 0 ? void 0 : _markerContainer$getE[0];
5968
- iconHeight = "".concat((_iconContainer$height = iconContainer === null || iconContainer === void 0 ? void 0 : iconContainer.height) !== null && _iconContainer$height !== void 0 ? _iconContainer$height : 40, "px");
5969
- iconWidth = "".concat((_iconContainer$width = iconContainer === null || iconContainer === void 0 ? void 0 : iconContainer.width) !== null && _iconContainer$width !== void 0 ? _iconContainer$width : 40, "px");
5969
+ iconHeight = "".concat((_iconContainer$height = iconContainer.height) !== null && _iconContainer$height !== void 0 ? _iconContainer$height : 40, "px");
5970
+ iconWidth = "".concat((_iconContainer$width = iconContainer.width) !== null && _iconContainer$width !== void 0 ? _iconContainer$width : 40, "px");
5970
5971
  return this.setAndCreateText(marker, markerContainer, iconHeight, iconWidth);
5971
5972
  }
5972
5973
  var markerElementsContainer = document.createElement("div");
@@ -5988,8 +5989,8 @@ function requireDist () {
5988
5989
  } else if (marker.icon) {
5989
5990
  var _marker$icon$getEleme, _iconContainer$height2, _iconContainer$width2;
5990
5991
  var _iconContainer = (_marker$icon$getEleme = marker.icon.getElementsByTagName("img")) === null || _marker$icon$getEleme === void 0 ? void 0 : _marker$icon$getEleme[0];
5991
- iconHeight = "".concat((_iconContainer$height2 = _iconContainer === null || _iconContainer === void 0 ? void 0 : _iconContainer.height) !== null && _iconContainer$height2 !== void 0 ? _iconContainer$height2 : 40, "px");
5992
- iconWidth = "".concat((_iconContainer$width2 = _iconContainer === null || _iconContainer === void 0 ? void 0 : _iconContainer.width) !== null && _iconContainer$width2 !== void 0 ? _iconContainer$width2 : 40, "px");
5992
+ iconHeight = "".concat((_iconContainer$height2 = _iconContainer.height) !== null && _iconContainer$height2 !== void 0 ? _iconContainer$height2 : 40, "px");
5993
+ iconWidth = "".concat((_iconContainer$width2 = _iconContainer.width) !== null && _iconContainer$width2 !== void 0 ? _iconContainer$width2 : 40, "px");
5993
5994
  markerElementsContainer.appendChild(marker.icon);
5994
5995
  }
5995
5996
  this.setAndCreateText(marker, markerElementsContainer, iconHeight, iconWidth);
@@ -6077,12 +6078,6 @@ function requireDist () {
6077
6078
  * Custom implementation of a MapLibre Marker
6078
6079
  */
6079
6080
  var MarkerAttribute = /*#__PURE__*/function (_Marker) {
6080
- /** Unique identifier for the marker attribute. */
6081
-
6082
- /** Geographic coordinates of the marker attribute. */
6083
-
6084
- /** Identifier of the floor where the marker attribute is located. */
6085
-
6086
6081
  /**
6087
6082
  * Constructs a new `MarkerAttribute` object with the specified properties.
6088
6083
  * @param markerConfig `MarkerConfig` object containing the configuration properties.
@@ -6095,6 +6090,11 @@ function requireDist () {
6095
6090
  element: MarkerUtils.createMarkerElement(markerConfig),
6096
6091
  draggable: false
6097
6092
  }]);
6093
+ /** Unique identifier for the marker attribute. */
6094
+ /** Geographic coordinates of the marker attribute. */
6095
+ /** Identifier of the floor where the marker attribute is located. */
6096
+ /** Flag to know if the marker is hidden*/
6097
+ _defineProperty(_this, "isHidden", false);
6098
6098
  _this.setLngLat([markerConfig.coordinate.lng, markerConfig.coordinate.lat]);
6099
6099
  _this.setRotationAlignment((_markerConfig$rotatio = markerConfig.rotationAlignment) !== null && _markerConfig$rotatio !== void 0 ? _markerConfig$rotatio : "viewport");
6100
6100
  _this.setPitchAlignment("viewport");
@@ -6112,7 +6112,6 @@ function requireDist () {
6112
6112
  return _createClass(MarkerAttribute, [{
6113
6113
  key: "addToMap",
6114
6114
  value: function addToMap(map) {
6115
- if (!map) return;
6116
6115
  this.addTo(map);
6117
6116
  }
6118
6117
 
@@ -6157,7 +6156,8 @@ function requireDist () {
6157
6156
  }, {
6158
6157
  key: "hide",
6159
6158
  value: function hide() {
6160
- this.remove();
6159
+ this.isHidden = true;
6160
+ this._element.style.visibility = "hidden";
6161
6161
  }
6162
6162
 
6163
6163
  /**
@@ -6165,11 +6165,9 @@ function requireDist () {
6165
6165
  */
6166
6166
  }, {
6167
6167
  key: "show",
6168
- value: function show(map) {
6169
- if (!map) {
6170
- return;
6171
- }
6172
- this.addTo(map);
6168
+ value: function show() {
6169
+ this.isHidden = false;
6170
+ this._element.style.visibility = "visible";
6173
6171
  }
6174
6172
 
6175
6173
  /**
@@ -6177,11 +6175,11 @@ function requireDist () {
6177
6175
  */
6178
6176
  }, {
6179
6177
  key: "changeFloor",
6180
- value: function changeFloor(floorId, map) {
6181
- if (floorId == this.floorId || !this.floorId) {
6182
- this.show(map);
6178
+ value: function changeFloor(floorId) {
6179
+ if (floorId == this.floorId && !this.isHidden) {
6180
+ this._element.style.visibility = "visible";
6183
6181
  } else {
6184
- this.hide();
6182
+ this._element.style.visibility = "hidden";
6185
6183
  }
6186
6184
  }
6187
6185
  }]);
@@ -6190,7 +6188,7 @@ function requireDist () {
6190
6188
  function nav_functions_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
6191
6189
  function nav_functions_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, nav_functions_toPropertyKey(o.key), o); } }
6192
6190
  function nav_functions_createClass(e, r, t) { return t && nav_functions_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; }
6193
- function _defineProperty(e, r, t) { return (r = nav_functions_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
6191
+ function nav_functions_defineProperty(e, r, t) { return (r = nav_functions_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
6194
6192
  function nav_functions_toPropertyKey(t) { var i = nav_functions_toPrimitive(t, "string"); return "symbol" == nav_functions_typeof(i) ? i : i + ""; }
6195
6193
  function nav_functions_toPrimitive(t, r) { if ("object" != nav_functions_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != nav_functions_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6196
6194
  var asin = Math.asin,
@@ -6340,7 +6338,7 @@ function requireDist () {
6340
6338
  }
6341
6339
  }]);
6342
6340
  }();
6343
- _defineProperty(NavFunctions, "EARTH_RADIUS", 6378000);
6341
+ nav_functions_defineProperty(NavFunctions, "EARTH_RADIUS", 6378000);
6344
6342
  function routeController_typeof(o) { "@babel/helpers - typeof"; return routeController_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, routeController_typeof(o); }
6345
6343
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
6346
6344
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -6526,7 +6524,7 @@ function requireDist () {
6526
6524
  key: "updateLayerFilter",
6527
6525
  value: function updateLayerFilter(layerId, floorId) {
6528
6526
  var newFloorId = floorId !== null && floorId !== void 0 ? floorId : this.lazarilloMap.getCurrentFloor();
6529
- if (newFloorId === undefined || !this.map) return;
6527
+ if (newFloorId === undefined) return;
6530
6528
  if (this.map.getStyle().layers.some(function (layer) {
6531
6529
  return layer.id === layerId;
6532
6530
  })) {
@@ -6564,7 +6562,7 @@ function requireDist () {
6564
6562
  key: "updateRouteMarkerVisibility",
6565
6563
  value: function updateRouteMarkerVisibility(floorId) {
6566
6564
  var _this$routeMarker, _this$routeMarker2, _this$routeMarker3;
6567
- ((_this$routeMarker = this.routeMarker) === null || _this$routeMarker === void 0 ? void 0 : _this$routeMarker.floorId) === floorId ? (_this$routeMarker2 = this.routeMarker) === null || _this$routeMarker2 === void 0 ? void 0 : _this$routeMarker2.show(this.map) : (_this$routeMarker3 = this.routeMarker) === null || _this$routeMarker3 === void 0 ? void 0 : _this$routeMarker3.hide();
6565
+ ((_this$routeMarker = this.routeMarker) === null || _this$routeMarker === void 0 ? void 0 : _this$routeMarker.floorId) === floorId ? (_this$routeMarker2 = this.routeMarker) === null || _this$routeMarker2 === void 0 ? void 0 : _this$routeMarker2.show() : (_this$routeMarker3 = this.routeMarker) === null || _this$routeMarker3 === void 0 ? void 0 : _this$routeMarker3.hide();
6568
6566
  }
6569
6567
  }, {
6570
6568
  key: "updatePlaceFloorForRouting",
@@ -7308,39 +7306,33 @@ function requireDist () {
7308
7306
  };
7309
7307
  var Logger = /*#__PURE__*/function () {
7310
7308
  function Logger() {
7309
+ var _Countly$q;
7311
7310
  logger_classCallCheck(this, Logger);
7312
- {
7313
- var _Countly$q;
7314
- countly_default().init({
7315
- app_key: logger_countly.apiKey,
7316
- url: logger_countly.url,
7317
- app_version: "2.15.0",
7318
- session_update: 10,
7319
- debug: false,
7320
- require_consent: false,
7321
- namespace: "SDK JS"
7322
- });
7323
- this.countly = (countly_default()) !== null && (countly_default()) !== void 0 ? (countly_default()) : {};
7324
- this.countly.q = (_Countly$q = (countly_default()).q) !== null && _Countly$q !== void 0 ? _Countly$q : [];
7325
- this.countly.q.push(["track_sessions", "track_pageview", "track_clicks", "track_scrolls", "track_errors", "track_links", "track_forms", "collect_from_forms"]);
7326
- }
7311
+ countly_default().init({
7312
+ app_key: logger_countly.apiKey,
7313
+ url: logger_countly.url,
7314
+ app_version: "2.14.0",
7315
+ session_update: 10,
7316
+ debug: false,
7317
+ require_consent: false,
7318
+ namespace: "SDK JS"
7319
+ });
7320
+ this.countly = (countly_default()) !== null && (countly_default()) !== void 0 ? (countly_default()) : {};
7321
+ this.countly.q = (_Countly$q = (countly_default()).q) !== null && _Countly$q !== void 0 ? _Countly$q : [];
7322
+ this.countly.q.push(["track_sessions", "track_pageview", "track_clicks", "track_scrolls", "track_errors", "track_links", "track_forms", "collect_from_forms"]);
7327
7323
  }
7328
7324
  return logger_createClass(Logger, [{
7329
7325
  key: "logEvent",
7330
7326
  value: function logEvent(eventName, eventSegmentation) {
7331
- {
7332
- this.countly.q.push(["add_event", {
7333
- key: eventName,
7334
- segmentation: eventSegmentation
7335
- }]);
7336
- }
7327
+ this.countly.q.push(["add_event", {
7328
+ key: eventName,
7329
+ segmentation: eventSegmentation
7330
+ }]);
7337
7331
  }
7338
7332
  }, {
7339
7333
  key: "logError",
7340
7334
  value: function logError(error, segmentation) {
7341
- {
7342
- this.countly.q.push(["log_error", error, segmentation]);
7343
- }
7335
+ this.countly.q.push(["log_error", error, segmentation]);
7344
7336
  }
7345
7337
  }, {
7346
7338
  key: "debugLog",
@@ -7848,10 +7840,6 @@ function requireDist () {
7848
7840
  * The type of the object being referenced by {@link parentId}
7849
7841
  */
7850
7842
 
7851
- /**
7852
- * Tags for place
7853
- */
7854
-
7855
7843
  /**
7856
7844
  * Creates a new place instance with the parameters specified in the data.
7857
7845
  * @hidden
@@ -7859,7 +7847,7 @@ function requireDist () {
7859
7847
  * @returns A new instance of LzPlace is returned.
7860
7848
  */
7861
7849
  function LzPlace(rawPlace) {
7862
- var _rawPlace$tags, _rawPlace$keywords, _rawPlace$alias, _rawPlace$tags2, _rawPlace$localizedCa, _rawPlace$properties, _rawPlace$images, _rawPlace$banners, _rawPlace$properties2;
7850
+ var _rawPlace$tags, _rawPlace$keywords, _rawPlace$alias, _rawPlace$localizedCa, _rawPlace$properties, _rawPlace$images, _rawPlace$banners, _rawPlace$properties2;
7863
7851
  place_classCallCheck(this, LzPlace);
7864
7852
  var tagsAndKeywords = ((_rawPlace$tags = rawPlace.tags) !== null && _rawPlace$tags !== void 0 ? _rawPlace$tags : []).concat((_rawPlace$keywords = rawPlace.keywords) !== null && _rawPlace$keywords !== void 0 ? _rawPlace$keywords : []);
7865
7853
  this.lazarilloId = rawPlace.id;
@@ -7873,7 +7861,6 @@ function requireDist () {
7873
7861
  lng: rawPlace.lng
7874
7862
  };
7875
7863
  this.category = rawPlace.category;
7876
- this.tags = (_rawPlace$tags2 = rawPlace.tags) !== null && _rawPlace$tags2 !== void 0 ? _rawPlace$tags2 : [];
7877
7864
  this.generalCategory = rawPlace.general_category;
7878
7865
  this.localizedCategory = (_rawPlace$localizedCa = rawPlace.localizedCategory) !== null && _rawPlace$localizedCa !== void 0 ? _rawPlace$localizedCa : "";
7879
7866
  this.parentInstitutionId = rawPlace.parent_institution;
@@ -7892,9 +7879,7 @@ function requireDist () {
7892
7879
  this.transportLine = (_rawPlace$properties = rawPlace.properties) === null || _rawPlace$properties === void 0 ? void 0 : _rawPlace$properties.filter(function (p) {
7893
7880
  return p.type === "transport_line";
7894
7881
  });
7895
- if (rawPlace.logo) {
7896
- this.logo = typeof rawPlace.logo === "string" ? rawPlace.logo : rawPlace.logo.light;
7897
- }
7882
+ this.logo = rawPlace.logo;
7898
7883
  this.images = (_rawPlace$images = rawPlace.images) !== null && _rawPlace$images !== void 0 ? _rawPlace$images : [];
7899
7884
  this.banners = ((_rawPlace$banners = rawPlace.banners) !== null && _rawPlace$banners !== void 0 ? _rawPlace$banners : []).map(function (bannerResponse) {
7900
7885
  return new Banner(bannerResponse);
@@ -8023,6 +8008,8 @@ function requireDist () {
8023
8008
  }
8024
8009
  return properties;
8025
8010
  } catch (err) {
8011
+ console.log(err);
8012
+ console.log(response);
8026
8013
  return [];
8027
8014
  }
8028
8015
  }
@@ -9935,7 +9922,7 @@ function requireDist () {
9935
9922
  if (mapConfig.parentPlaceId != null) {
9936
9923
  _this.initialPlaceDetailSetUp(mapConfig.parentPlaceId);
9937
9924
  }
9938
- if (mapConfig.otherPotentialParentPlacesIds && mapConfig.otherPotentialParentPlacesIds.length > 0) {
9925
+ if (mapConfig.otherPotentialParentPlacesIds) {
9939
9926
  _this.loadOtherPotentialParentPlaces(mapConfig.otherPotentialParentPlacesIds);
9940
9927
  }
9941
9928
  _this.enableHover = mapConfig.enableHover || false;
@@ -9960,11 +9947,7 @@ function requireDist () {
9960
9947
  this.repository.fetchAndParsePlaceDetail(parentPlaceId).then(function (place) {
9961
9948
  _this3.changeParentPlaceTo(place);
9962
9949
  _this3.potentialParentPlaces.push(place);
9963
- })["catch"](function (error) {
9964
- _this3.logError(error, {
9965
- functionName: "initialPlaceDetailSetUp"
9966
- });
9967
- });
9950
+ })["catch"](console.error);
9968
9951
  }
9969
9952
  }, {
9970
9953
  key: "loadOtherPotentialParentPlaces",
@@ -9975,11 +9958,7 @@ function requireDist () {
9975
9958
  })).then(function (places) {
9976
9959
  var _this4$potentialParen;
9977
9960
  (_this4$potentialParen = _this4.potentialParentPlaces).push.apply(_this4$potentialParen, map_toConsumableArray(places));
9978
- })["catch"](function (error) {
9979
- _this4.logError(error, {
9980
- functionName: "loadOtherPotentialParentPlaces"
9981
- });
9982
- });
9961
+ })["catch"](console.error);
9983
9962
  }
9984
9963
  }, {
9985
9964
  key: "subPlacesLoad",
@@ -9987,19 +9966,14 @@ function requireDist () {
9987
9966
  var _this5 = this;
9988
9967
  this.repository.fetchAndParseSubPlaces(parentPlaceId).then(function (subPlaces) {
9989
9968
  _this5.subPlaces = subPlaces;
9990
- })["catch"](function (error) {
9991
- _this5.logError(error, {
9992
- functionName: "subPlacesLoad"
9993
- });
9994
- _this5.subPlaces = [];
9995
- });
9969
+ })["catch"](console.error);
9996
9970
  }
9997
9971
  }, {
9998
9972
  key: "initialMapStyleSetUp",
9999
9973
  value: function initialMapStyleSetUp(mapConfig, container) {
10000
9974
  var _this6 = this;
10001
9975
  this.repository.fetchAndParseMapStyle(mapConfig.parentPlaceId).then(function (style) {
10002
- var _mapConfig$pitch, _mapConfig$bearingSna, _mapConfig$navigation;
9976
+ var _mapConfig$pitch, _mapConfig$bearingSna;
10003
9977
  var mapOptions = {
10004
9978
  container: container,
10005
9979
  style: style,
@@ -10007,7 +9981,6 @@ function requireDist () {
10007
9981
  zoom: mapConfig.zoom,
10008
9982
  pitch: (_mapConfig$pitch = mapConfig.pitch) !== null && _mapConfig$pitch !== void 0 ? _mapConfig$pitch : 0,
10009
9983
  attributionControl: false,
10010
- maplibreLogo: false,
10011
9984
  bearingSnap: (_mapConfig$bearingSna = mapConfig.bearingSnap) !== null && _mapConfig$bearingSna !== void 0 ? _mapConfig$bearingSna : 0
10012
9985
  };
10013
9986
  if (mapConfig.maxZoom) mapOptions.maxZoom = mapConfig.maxZoom;
@@ -10017,10 +9990,7 @@ function requireDist () {
10017
9990
  mapOptions.maxBounds = new maplibre_gl.LngLatBounds([boundingBox[0].lng, boundingBox[0].lat], [boundingBox[1].lng, boundingBox[1].lat]);
10018
9991
  }
10019
9992
  _this6.map = new maplibre_gl.Map(mapOptions);
10020
- _this6.map.addControl(new maplibre_gl.NavigationControl({
10021
- showCompass: mapConfig.showCompass !== undefined ? mapConfig.showCompass : true,
10022
- showZoom: mapConfig.showZoom !== undefined ? mapConfig.showZoom : true
10023
- }), (_mapConfig$navigation = mapConfig.navigationPosition) !== null && _mapConfig$navigation !== void 0 ? _mapConfig$navigation : "top-right");
9993
+ _this6.map.addControl(new maplibre_gl.NavigationControl({}), "top-right");
10024
9994
  _this6.map.on("load", function () {
10025
9995
  var _mapConfig$onMapReady;
10026
9996
  _this6.whenStyleUpdates(style);
@@ -10038,11 +10008,7 @@ function requireDist () {
10038
10008
  });
10039
10009
  _this6.defaultClickListener();
10040
10010
  return _this6.map;
10041
- })["catch"](function (error) {
10042
- _this6.logError(error, {
10043
- functionName: "initialMapStyleSetUp"
10044
- });
10045
- });
10011
+ })["catch"](console.error);
10046
10012
  }
10047
10013
  }, {
10048
10014
  key: "setBaseFilters",
@@ -10171,11 +10137,7 @@ function requireDist () {
10171
10137
  _this9.map.setStyle(style);
10172
10138
  _this9.whenStyleUpdates(style);
10173
10139
  onStyleReady === null || onStyleReady === void 0 || onStyleReady();
10174
- })["catch"](function (error) {
10175
- _this9.logError(error, {
10176
- functionName: "changeParentPlaceTo"
10177
- });
10178
- });
10140
+ })["catch"](console.error);
10179
10141
  }
10180
10142
  }
10181
10143
 
@@ -10216,6 +10178,7 @@ function requireDist () {
10216
10178
  this.logError(error, {
10217
10179
  functionName: "updateParentPlaceAndFloor"
10218
10180
  });
10181
+ throw new Error("Failed to update parent place and floor");
10219
10182
  }
10220
10183
  }
10221
10184
  }, {
@@ -10255,7 +10218,8 @@ function requireDist () {
10255
10218
  value: function addMarker(marker) {
10256
10219
  try {
10257
10220
  var markerCreated = new MarkerAttribute(marker);
10258
- markerCreated.changeFloor(this.currentFloor, this.map);
10221
+ markerCreated.changeFloor(this.currentFloor);
10222
+ markerCreated.addToMap(this.map);
10259
10223
  this.markers.push(markerCreated);
10260
10224
  this.logEvent("addMarker");
10261
10225
  return markerCreated.id;
@@ -10263,7 +10227,7 @@ function requireDist () {
10263
10227
  this.logError(error, {
10264
10228
  functionName: "addMarker"
10265
10229
  });
10266
- return "";
10230
+ throw new Error("Failed to add marker");
10267
10231
  }
10268
10232
  }
10269
10233
  }, {
@@ -10283,7 +10247,7 @@ function requireDist () {
10283
10247
  this.logError(error, {
10284
10248
  functionName: "updateMarker"
10285
10249
  });
10286
- return "";
10250
+ throw new Error("Failed to update marker");
10287
10251
  }
10288
10252
  }
10289
10253
  }, {
@@ -10293,14 +10257,15 @@ function requireDist () {
10293
10257
  var _marker2 = this.markers.find(function (e) {
10294
10258
  return e.id === markerId;
10295
10259
  });
10296
- if (_marker2 !== null && this.map) {
10297
- _marker2 === null || _marker2 === void 0 || _marker2.show(this.map);
10260
+ if (_marker2 !== null) {
10261
+ _marker2 === null || _marker2 === void 0 || _marker2.show();
10298
10262
  }
10299
10263
  this.logEvent("showMarker");
10300
10264
  } catch (error) {
10301
10265
  this.logError(error, {
10302
10266
  functionName: "showMarker"
10303
10267
  });
10268
+ throw new Error("Failed to show marker");
10304
10269
  }
10305
10270
  }
10306
10271
  }, {
@@ -10318,6 +10283,7 @@ function requireDist () {
10318
10283
  this.logError(error, {
10319
10284
  functionName: "hideMarker"
10320
10285
  });
10286
+ throw new Error("Failed to hide marker");
10321
10287
  }
10322
10288
  }
10323
10289
  }, {
@@ -10338,6 +10304,7 @@ function requireDist () {
10338
10304
  this.logError(error, {
10339
10305
  functionName: "removeMarker"
10340
10306
  });
10307
+ throw new Error("Failed to remove marker");
10341
10308
  }
10342
10309
  }
10343
10310
 
@@ -10348,14 +10315,12 @@ function requireDist () {
10348
10315
  }, {
10349
10316
  key: "filterByFloorKey",
10350
10317
  value: function filterByFloorKey(floorKey) {
10351
- this.currentFloor = floorKey;
10352
10318
  if (this.innerFloors.every(function (floor) {
10353
10319
  return floor.key !== floorKey;
10354
10320
  }) && floorKey !== "") {
10355
- this.logEvent("invalidFloorKey", {
10356
- floorKey: floorKey
10357
- });
10321
+ throw new Error("Invalid id '".concat(floorKey, "' for inner floor"));
10358
10322
  }
10323
+ this.currentFloor = floorKey;
10359
10324
  this.updateFiltersTo(floorKey);
10360
10325
  this.updateMarkersTo(floorKey);
10361
10326
  this.routeController.updateRouteLayers(floorKey);
@@ -10369,9 +10334,8 @@ function requireDist () {
10369
10334
  }, {
10370
10335
  key: "updateMarkersTo",
10371
10336
  value: function updateMarkersTo(floorId) {
10372
- var _this10 = this;
10373
10337
  this.markers.forEach(function (e) {
10374
- e.changeFloor(floorId, _this10.map);
10338
+ e.changeFloor(floorId);
10375
10339
  });
10376
10340
  }
10377
10341
  }, {
@@ -10379,14 +10343,13 @@ function requireDist () {
10379
10343
  value: function updateFiltersTo(floorId) {
10380
10344
  var _this$map$getStyle$la2,
10381
10345
  _this$map$getStyle2,
10382
- _this11 = this,
10346
+ _this10 = this,
10383
10347
  _this$innerFloors$fin4;
10384
- if (!this.map) return;
10385
10348
  var layers = (_this$map$getStyle$la2 = (_this$map$getStyle2 = this.map.getStyle()) === null || _this$map$getStyle2 === void 0 ? void 0 : _this$map$getStyle2.layers) !== null && _this$map$getStyle$la2 !== void 0 ? _this$map$getStyle$la2 : [];
10386
10349
  layers.filter(function (l) {
10387
10350
  return l.id.startsWith("base-indoor-");
10388
10351
  }).forEach(function (l) {
10389
- _this11.map.removeLayer(l.id);
10352
+ _this10.map.removeLayer(l.id);
10390
10353
  });
10391
10354
  var baseFloorId = (_this$innerFloors$fin4 = this.innerFloors.find(function (floor) {
10392
10355
  return floor.key === floorId;
@@ -10402,13 +10365,13 @@ function requireDist () {
10402
10365
  }).forEach(function (layer) {
10403
10366
  var baseLayer = structuredClone(layer);
10404
10367
  baseLayer.id = "base-" + layer.id;
10405
- _this11.baseFilters[baseLayer.id] = _this11.baseFilters[layer.id];
10406
- _this11.map.addLayer(baseLayer, firstLayerId);
10407
- _this11.applyLayerFilters(baseLayer, baseFloorId);
10368
+ _this10.baseFilters[baseLayer.id] = _this10.baseFilters[layer.id];
10369
+ _this10.map.addLayer(baseLayer, firstLayerId);
10370
+ _this10.applyLayerFilters(baseLayer, baseFloorId);
10408
10371
  });
10409
10372
  }
10410
10373
  indoorLayers.forEach(function (layer) {
10411
- _this11.applyLayerFilters(layer, floorId);
10374
+ _this10.applyLayerFilters(layer, floorId);
10412
10375
  });
10413
10376
  }
10414
10377
  }, {
@@ -10543,6 +10506,7 @@ function requireDist () {
10543
10506
  functionName: "updateFloor",
10544
10507
  floorId: floorId
10545
10508
  });
10509
+ throw new Error("Failed to update floor");
10546
10510
  }
10547
10511
  }
10548
10512
  }, {
@@ -10562,6 +10526,7 @@ function requireDist () {
10562
10526
  functionName: "updatePlaceAndFloorForRouting",
10563
10527
  floorId: floorId
10564
10528
  });
10529
+ throw new Error("Failed to update place and floor for routing");
10565
10530
  }
10566
10531
  }
10567
10532
  }, {
@@ -10615,6 +10580,7 @@ function requireDist () {
10615
10580
  this.logError(error, {
10616
10581
  functionName: "removeRoute"
10617
10582
  });
10583
+ throw new Error("Error: Failed to remove route");
10618
10584
  }
10619
10585
  }
10620
10586
  }, {
@@ -10651,26 +10617,26 @@ function requireDist () {
10651
10617
  }, {
10652
10618
  key: "defaultClickListener",
10653
10619
  value: function defaultClickListener() {
10654
- var _this12 = this;
10620
+ var _this11 = this;
10655
10621
  this.map.on("click", function (e) {
10656
10622
  var _ref4, _clickedPlace$lazaril;
10657
- var features = _this12.map.queryRenderedFeatures(e.point);
10623
+ var features = _this11.map.queryRenderedFeatures(e.point);
10658
10624
  var touchedFeature = features.find(function (feature) {
10659
10625
  return feature.properties["class"] === "room";
10660
10626
  });
10661
- var clickedPlace = _this12.subPlaces.find(function (subPlace) {
10627
+ var clickedPlace = _this11.subPlaces.find(function (subPlace) {
10662
10628
  return subPlace.lazarilloId === (touchedFeature === null || touchedFeature === void 0 ? void 0 : touchedFeature.properties.ref);
10663
10629
  });
10664
10630
  var clickedPlaceId = (_ref4 = (_clickedPlace$lazaril = clickedPlace === null || clickedPlace === void 0 ? void 0 : clickedPlace.lazarilloId) !== null && _clickedPlace$lazaril !== void 0 ? _clickedPlace$lazaril : clickedPlace === null || clickedPlace === void 0 ? void 0 : clickedPlace.clientId) !== null && _ref4 !== void 0 ? _ref4 : "";
10665
- if (clickedPlace !== undefined && _this12.clickCallback) {
10666
- _this12.clickCallback(clickedPlaceId);
10631
+ if (clickedPlace !== undefined && _this11.clickCallback) {
10632
+ _this11.clickCallback(clickedPlaceId);
10667
10633
  }
10668
10634
  });
10669
10635
  }
10670
10636
  }, {
10671
10637
  key: "onHover",
10672
10638
  value: function onHover() {
10673
- var _this13 = this;
10639
+ var _this12 = this;
10674
10640
  if (!this.enableHover) return;
10675
10641
  this.map.on("mousemove", "hoverable", function (e) {
10676
10642
  var _e$features;
@@ -10678,100 +10644,54 @@ function requireDist () {
10678
10644
  var _feature$properties$r, _feature$properties;
10679
10645
  return (
10680
10646
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
10681
- ((_feature$properties$r = feature.properties.ref) === null || _feature$properties$r === void 0 ? void 0 : _feature$properties$r.length) > 0 && ((_feature$properties = feature.properties) === null || _feature$properties === void 0 ? void 0 : _feature$properties.floor_key) === _this13.currentFloor
10647
+ ((_feature$properties$r = feature.properties.ref) === null || _feature$properties$r === void 0 ? void 0 : _feature$properties$r.length) > 0 && ((_feature$properties = feature.properties) === null || _feature$properties === void 0 ? void 0 : _feature$properties.floor_key) === _this12.currentFloor
10682
10648
  );
10683
10649
  });
10684
10650
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
10685
10651
  var ref = feature === null || feature === void 0 ? void 0 : feature.properties.ref;
10686
10652
  if (ref !== undefined && ref.length > 0) {
10687
- _this13.hoveredId = ref;
10688
- _this13.updateFiltersTo(_this13.currentFloor);
10689
- } else if (ref === undefined && _this13.hoveredId !== "unselected") {
10690
- _this13.hoveredId = "unselected";
10691
- _this13.updateFiltersTo(_this13.currentFloor);
10653
+ _this12.hoveredId = ref;
10654
+ _this12.updateFiltersTo(_this12.currentFloor);
10655
+ } else if (ref === undefined && _this12.hoveredId !== "unselected") {
10656
+ _this12.hoveredId = "unselected";
10657
+ _this12.updateFiltersTo(_this12.currentFloor);
10692
10658
  }
10693
10659
  });
10694
10660
 
10695
10661
  // When the mouse leaves the state-fill layer, update the feature state of the
10696
10662
  // previously hovered feature.
10697
10663
  this.map.on("mouseleave", "hoverable", function () {
10698
- _this13.hoveredId = "unselected";
10699
- _this13.updateFiltersTo(_this13.currentFloor);
10664
+ _this12.hoveredId = "unselected";
10665
+ _this12.updateFiltersTo(_this12.currentFloor);
10700
10666
  });
10701
10667
  }
10702
10668
  }, {
10703
10669
  key: "setPlacesAsSelected",
10704
- value: function setPlacesAsSelected(placeIds, color) {
10670
+ value: function setPlacesAsSelected(placeIds) {
10671
+ var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "#276EF1";
10705
10672
  try {
10706
10673
  if (!this.hasLayer("indoor-colored-places")) {
10707
- this.logError(new Error("Layer indoor-colored-places does not exist on current style"));
10708
- this.createColoredPlacesLayer();
10674
+ return;
10709
10675
  }
10710
10676
  var basicFilter = this.createBasicFilters();
10711
- var coloredPlacesFilters = placeIds.map(function (id) {
10712
- var filter = ["==", ["get", "ref"], id];
10677
+ var coloredPlaces = this.subPlaces.filter(function (place) {
10678
+ var _place$clientId;
10679
+ return placeIds.includes((_place$clientId = place.clientId) !== null && _place$clientId !== void 0 ? _place$clientId : "") || placeIds.includes(place.lazarilloId);
10680
+ });
10681
+ var coloredPlacesFilters = coloredPlaces.map(function (place) {
10682
+ var filter = ["==", ["get", "ref"], place.lazarilloId];
10713
10683
  return filter;
10714
10684
  });
10715
10685
  var placeFilter = ["any"].concat(map_toConsumableArray(coloredPlacesFilters));
10716
10686
  var condition = ["all", placeFilter, basicFilter];
10717
10687
  this.map.setFilter("indoor-colored-places", condition);
10718
10688
  this.baseFilters["indoor-colored-places"] = placeFilter;
10719
- if (color !== undefined) {
10720
- var layer = this.map.getLayer("indoor-colored-places");
10721
- switch (layer === null || layer === void 0 ? void 0 : layer.type) {
10722
- case "fill":
10723
- this.map.setPaintProperty("indoor-colored-places", "fill-color", color);
10724
- break;
10725
- case "fill-extrusion":
10726
- this.map.setPaintProperty("indoor-colored-places", "fill-extrusion-color", color);
10727
- break;
10728
- default:
10729
- break;
10730
- }
10731
- }
10689
+ this.map.setPaintProperty("indoor-colored-places", "fill-color", color);
10732
10690
  } catch (error) {
10733
10691
  this.logError(error, {
10734
10692
  functionName: "setPlacesAsSelected"
10735
10693
  });
10736
- }
10737
- }
10738
- }, {
10739
- key: "is3DStyle",
10740
- value: function is3DStyle() {
10741
- var layers = this.map.getStyle().layers;
10742
- return layers.some(function (layer) {
10743
- return layer.type === "fill-extrusion";
10744
- });
10745
- }
10746
- }, {
10747
- key: "createColoredPlacesLayer",
10748
- value: function createColoredPlacesLayer() {
10749
- if (this.is3DStyle()) {
10750
- var layer = {
10751
- id: "indoor-colored-places",
10752
- type: "fill-extrusion",
10753
- source: "indoorequal",
10754
- "source-layer": "area",
10755
- filter: ["all", ["has", "ref"], ["==", ["get", "ref"], "unselected"]],
10756
- paint: {
10757
- "fill-extrusion-height": 2.5,
10758
- "fill-extrusion-color": "#276EF1",
10759
- "fill-extrusion-opacity": 0.8
10760
- }
10761
- };
10762
- this.map.addLayer(layer);
10763
- } else {
10764
- var _layer = {
10765
- id: "indoor-colored-places",
10766
- type: "fill",
10767
- source: "indoorequal",
10768
- "source-layer": "area",
10769
- filter: ["all", ["has", "ref"], ["==", ["get", "ref"], "unselected"]],
10770
- paint: {
10771
- "fill-color": "#276EF1"
10772
- }
10773
- };
10774
- this.map.addLayer(_layer);
10694
+ throw new Error("Failed to set places as selected");
10775
10695
  }
10776
10696
  }
10777
10697
  }, {
@@ -10781,7 +10701,7 @@ function requireDist () {
10781
10701
  var publicPlaceFilter = ["==", ["get", "public_place"], true];
10782
10702
  var subPlaceFilter = ["!=", ["get", "is_subplace"], (_this$parentPlaceId3 = this.parentPlaceId) !== null && _this$parentPlaceId3 !== void 0 ? _this$parentPlaceId3 : ""];
10783
10703
  var floorId = (_this$currentFloor = this.currentFloor) !== null && _this$currentFloor !== void 0 ? _this$currentFloor : "+";
10784
- var floorFilter = ["==", ["get", "floor_key"], floorId];
10704
+ var floorFilter = ["any", ["==", ["get", "floor_key"], floorId]];
10785
10705
  var showInFloorFilter = ["==", ["get", "show_in_floor"], floorId];
10786
10706
  var basicFilters = publicPlaceFilter;
10787
10707
  if (this.parentPlaceId != null) {
@@ -11107,7 +11027,6 @@ function requireDist () {
11107
11027
  }, {
11108
11028
  key: "addUserLocationTracking",
11109
11029
  value: function addUserLocationTracking(enableHighAccuracy) {
11110
- var _this14 = this;
11111
11030
  var initialCoordinate = {
11112
11031
  lat: 0.0,
11113
11032
  lng: 0.0
@@ -11126,9 +11045,7 @@ function requireDist () {
11126
11045
  marker.setLngLat([position.coords.longitude, position.coords.latitude]);
11127
11046
  };
11128
11047
  this.watchPositionID = navigator.geolocation.watchPosition(updateMarker, function (error) {
11129
- _this14.logError(error, {
11130
- functionName: "addUserLocationTracking"
11131
- });
11048
+ console.error("Error getting user location:", error);
11132
11049
  }, {
11133
11050
  enableHighAccuracy: enableHighAccuracy
11134
11051
  });
@@ -11146,9 +11063,7 @@ function requireDist () {
11146
11063
  this.watchPositionID = undefined;
11147
11064
  }
11148
11065
  } else {
11149
- this.logError(new Error("Error trying to remove location tracking, is already gone"), {
11150
- functionName: "removeUserLocationTracking"
11151
- });
11066
+ console.error("Error trying to remove location tracking, is already gone");
11152
11067
  }
11153
11068
  }
11154
11069
  }, {
@@ -11158,25 +11073,28 @@ function requireDist () {
11158
11073
  }
11159
11074
  }, {
11160
11075
  key: "addBorderToPlaces",
11161
- value: function addBorderToPlaces(placeIds, color, width) {
11076
+ value: function addBorderToPlaces(placeIds) {
11077
+ var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "#276EF1";
11078
+ var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 4;
11162
11079
  try {
11163
11080
  if (!this.hasLayer("indoor-bordered-places")) {
11164
- this.logError(new Error("Layer indoor-bordered-places does not exist on current style"));
11165
- this.createBorderedPlacesLayer();
11081
+ throw new Error("Layer indoor-bordered-places does not exist on current style");
11166
11082
  }
11167
11083
  var basicFilter = this.createBasicFilters();
11168
- var coloredPlacesFilters = placeIds.map(function (id) {
11169
- var filter = ["==", ["get", "ref"], id];
11084
+ var coloredPlaces = this.subPlaces.filter(function (place) {
11085
+ var _place$clientId2;
11086
+ return placeIds.includes((_place$clientId2 = place.clientId) !== null && _place$clientId2 !== void 0 ? _place$clientId2 : "") || placeIds.includes(place.lazarilloId);
11087
+ });
11088
+ var coloredPlacesFilters = coloredPlaces.map(function (place) {
11089
+ var filter = ["==", ["get", "ref"], place.lazarilloId];
11170
11090
  return filter;
11171
11091
  });
11172
11092
  var placeFilter = ["any"].concat(map_toConsumableArray(coloredPlacesFilters));
11173
11093
  var condition = ["all", placeFilter, basicFilter];
11174
11094
  this.map.setFilter("indoor-bordered-places", condition);
11175
11095
  this.baseFilters["indoor-bordered-places"] = placeFilter;
11176
- if (color !== undefined && width !== undefined) {
11177
- this.map.setPaintProperty("indoor-bordered-places", "line-color", color);
11178
- this.map.setPaintProperty("indoor-bordered-places", "line-width", width);
11179
- }
11096
+ this.map.setPaintProperty("indoor-bordered-places", "line-color", color);
11097
+ this.map.setPaintProperty("indoor-bordered-places", "line-width", width);
11180
11098
  } catch (error) {
11181
11099
  this.logError(error, {
11182
11100
  functionName: "addBorderToPlaces"
@@ -11184,22 +11102,6 @@ function requireDist () {
11184
11102
  throw new Error("Failed to add border to places");
11185
11103
  }
11186
11104
  }
11187
- }, {
11188
- key: "createBorderedPlacesLayer",
11189
- value: function createBorderedPlacesLayer() {
11190
- var layer = {
11191
- id: "indoor-bordered-places",
11192
- type: "line",
11193
- source: "indoorequal",
11194
- "source-layer": "area",
11195
- filter: ["all", ["has", "ref"], ["==", ["get", "ref"], "unselected"]],
11196
- paint: {
11197
- "line-color": "#276EF1",
11198
- "line-width": 4
11199
- }
11200
- };
11201
- this.map.addLayer(layer);
11202
- }
11203
11105
  }, {
11204
11106
  key: "clearBorderedPlaces",
11205
11107
  value: function clearBorderedPlaces() {
@@ -12003,6 +11905,9 @@ class SDKController {
12003
11905
  });
12004
11906
  }
12005
11907
  }
11908
+ getDestination() {
11909
+ return this.contextProvider.value.destination;
11910
+ }
12006
11911
  async loadRoute(originId, destinationId, preferAccessibleRoute = false) {
12007
11912
  if (!this.connected) return;
12008
11913
  const sdk = this.contextProvider.value.sdk;
@@ -12355,6 +12260,19 @@ class RouteAnimationController {
12355
12260
  }
12356
12261
  setCurrentFloor(floorId) {
12357
12262
  this._currentMapFloor = floorId;
12263
+ const coordinates = this.route?.legs.flatMap(
12264
+ (leg) => leg.steps.filter((step) => step.startInsideFloor === floorId).flatMap((step) => step.coordinates)
12265
+ ) ?? [];
12266
+ if (coordinates.length > 0) {
12267
+ this.lzMap?.fitCoordinates(coordinates, {
12268
+ padding: {
12269
+ bottom: 150,
12270
+ left: 150,
12271
+ right: 150,
12272
+ top: 150
12273
+ }
12274
+ });
12275
+ }
12358
12276
  }
12359
12277
  setParentPlace(place) {
12360
12278
  this.parentPlace = place;
@@ -12366,6 +12284,7 @@ class RouteAnimationController {
12366
12284
  if (!this.connected || !this.lzMap || this.isAnimatingRoute) return;
12367
12285
  this.isAnimatingRoute = true;
12368
12286
  const animationConfig = {
12287
+ minimumSpeed: 20,
12369
12288
  callBack: (status) => {
12370
12289
  if (status.isFinished) {
12371
12290
  this.stopAnimatedRoute();
@@ -12418,6 +12337,10 @@ class RouteAnimationController {
12418
12337
  polylineWidth: 10,
12419
12338
  routeIcon
12420
12339
  };
12340
+ const firstFloor = route.legs?.[0]?.steps?.[0]?.startInsideFloor;
12341
+ if (firstFloor) {
12342
+ this.setCurrentFloor(firstFloor);
12343
+ }
12421
12344
  this.lzMap.startAnimateRoute(route, drawingConfig, animationConfig);
12422
12345
  this.route = route;
12423
12346
  this.handlers.onStartRouteAnimation();
@@ -12474,3 +12397,4 @@ class RouteAnimationController {
12474
12397
  }
12475
12398
 
12476
12399
  export { MarkerController as M, RouteAnimationController as R, SDKController as S };
12400
+ //# sourceMappingURL=utils-CL_wN9yE.js.map