proximiio-js-library 1.13.0 → 1.13.2

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.
@@ -319,7 +319,7 @@ export declare class Map {
319
319
  private onStopRouteAnimation;
320
320
  private onJumpToRouteEnd;
321
321
  private translateLayers;
322
- getClosestFeature(amenityId: string, fromFeature?: Feature): false | Feature;
322
+ getClosestFeature(amenityId: string, fromFeature?: Feature, handleDefaultPlace?: boolean): false | Feature;
323
323
  getFloorName(floor: FloorModel): string;
324
324
  private handleControllerError;
325
325
  private InjectCSS;
@@ -3324,12 +3324,12 @@ export class Map {
3324
3324
  }
3325
3325
  this.state.style.setSource('main', this.geojsonSource);
3326
3326
  }
3327
- getClosestFeature(amenityId, fromFeature) {
3327
+ getClosestFeature(amenityId, fromFeature, handleDefaultPlace = true) {
3328
3328
  let sameLevelfeatures = this.state.allFeatures.features.filter((i) => i.properties.amenity === amenityId &&
3329
3329
  i.geometry.type === 'Point' &&
3330
3330
  i.properties.level === (fromFeature ? fromFeature.properties.level : this.startPoint.properties.level));
3331
3331
  let features = this.state.allFeatures.features.filter((i) => i.properties.amenity === amenityId && i.geometry.type === 'Point');
3332
- if (this.defaultOptions.defaultPlaceId) {
3332
+ if (this.defaultOptions.defaultPlaceId && handleDefaultPlace) {
3333
3333
  sameLevelfeatures = sameLevelfeatures.filter((i) => i.properties.place_id === this.defaultOptions.defaultPlaceId);
3334
3334
  features = features.filter((i) => i.properties.place_id === this.defaultOptions.defaultPlaceId);
3335
3335
  }
@@ -7,6 +7,7 @@ export class PlaceModel extends BaseModel {
7
7
  this.location = data.location ? data.location : { lat: 60.1669635, lng: 24.9217484 };
8
8
  this.tags = data.tags;
9
9
  this.remoteId = data.remote_id;
10
+ this.metadata = data.metadata;
10
11
  }
11
12
  get hasLocation() {
12
13
  return !isNaN(this.location.lat) && !isNaN(this.location.lng);