becomap 1.5.64 → 1.5.66

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/lib/index.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
+ export interface BCMapLanguage {
4
+ name: string;
5
+ code: string;
6
+ }
3
7
  /**
4
8
  * Represents a coordinate:
5
9
  * - A tuple containing latitude and longitude as [latitude, longitude]
@@ -195,6 +199,12 @@ export interface BCMapSite {
195
199
  * @returns The map as BCMapFloor.
196
200
  */
197
201
  getDefaultMap(): BCMapFloor;
202
+ /**
203
+ * list of language options available for the site.
204
+ *
205
+ * @returns The site languages as BCMapLanguage[].
206
+ */
207
+ get otherLanguages(): BCMapLanguage[];
198
208
  }
199
209
  export interface BCColor {
200
210
  rgba: string;
@@ -230,7 +240,10 @@ declare enum BCLocationType {
230
240
  SHUTTLE = "SHUTTLE",
231
241
  /** Represents a kiosk, such as an information booth or ticket counter. */
232
242
  KIOSK = "KIOSK",
233
- MAP_OBJECT = "MAP_OBJECT"
243
+ /** Represents a 3D Object in map. */
244
+ MAP_OBJECT = "MAP_OBJECT",
245
+ /** Represents a Floor connection, like Lift, Escalator, Ramp etc. */
246
+ CONNECTION = "CONNECTION"
234
247
  }
235
248
  /**
236
249
  * Enum representing various amenities available at a site.
@@ -832,6 +845,15 @@ export interface BCAnswer {
832
845
  */
833
846
  answers: string[];
834
847
  }
848
+ /**
849
+ * Constructs a new MapView instance.
850
+ *
851
+ * @param container - The HTML element that will contain the map.
852
+ * @param site - The BCMapSite object that provides context and data for the map.
853
+ * @param options - Optional configuration settings for the initial map view.
854
+ * @param language - Optional configuration for settings the language.
855
+ */
856
+ export declare function getMapView(container: HTMLElement, site: BCMapSite, options?: BCMapViewOptions, language?: BCMapLanguage): Promise<BCMapView>;
835
857
  /**
836
858
  * Options for configuring the initial view of the map.
837
859
  *
@@ -865,178 +887,156 @@ export interface BCMapViewOptions {
865
887
  * Default bearing can be defined in the implementation.
866
888
  */
867
889
  bearing?: number;
890
+ /**
891
+ * Whether to hide layers outside the defined map boundaries.
892
+ * If set to `true`, layers outside the map's visible area will
893
+ * be hidden. This can improve performance and focus on the
894
+ * relevant map content.
895
+ */
896
+ hideOutsideLayers?: boolean;
897
+ /**
898
+ * The background color of the map container.
899
+ * This property allows setting a custom background color for
900
+ * the map container, which is visible when no map tiles are
901
+ * rendered or when the map is loading.
902
+ */
903
+ background?: string;
868
904
  }
869
905
  /**
870
- * Class representing a map view, providing methods to manipulate and interact
871
- * with the map interface.
906
+ * Interface representing the public API of the BCMapView class.
907
+ * This interface defines all the public methods and properties
908
+ * available for interacting with the map view.
872
909
  */
873
- export declare class BCMapView {
874
- #private;
875
- readonly mapSite: BCMapSite;
876
- readonly eventsHandler: BCEventEmitter<BCMapViewEvents>;
877
- get currentFloor(): BCMapFloor;
910
+ export interface BCMapView {
878
911
  /**
879
- * Constructs a new MapView instance.
880
- *
881
- * @param container - The HTML element that will contain the map.
882
- * @param site - The BCMapSite object that provides context and data for the map.
883
- * @param options - Optional configuration settings for the initial map view.
912
+ * The site associated with the map view.
884
913
  */
885
- constructor(container: HTMLElement, site: BCMapSite, options?: BCMapViewOptions);
914
+ readonly mapSite: BCMapSite;
886
915
  /**
887
- * Gets the HTML element that contains the map.
888
- *
889
- * @returns The HTMLElement representing the map container.
916
+ * The currently selected floor in the map view.
890
917
  */
891
- get container(): HTMLElement;
918
+ readonly currentFloor: BCMapFloor;
892
919
  /**
893
- * Provides access to the route controller, which manages routing operations
894
- * within the map view, such as route rendering.
895
- * @returns An instance of BCRouteController for managing route operations.
920
+ * Event handler for managing map-related events.
896
921
  */
922
+ readonly eventsHandler: BCEventEmitter<BCMapViewEvents>;
923
+ /**
924
+ * Provides access to the route controller, which manages routing operations
925
+ * within the map view, such as route rendering.
926
+ * @returns An instance of BCRouteController for managing route operations.
927
+ */
897
928
  get routeController(): BCRouteController;
898
929
  /**
899
- * Focuses the map on a specified location, optionally adjusting
900
- * the zoom level, bearing, and pitch.
901
- *
902
- * @param location - The location as BCLocation to focus on.
903
- * @param zoomLevel - Optional zoom level to apply when focusing on
904
- * the point. Defaults to the current zoom level if not specified.
905
- * @param bearing - Optional bearing to apply when focusing on the
906
- * point. Defaults to the current bearing if not specified.
907
- * @param pitch - Optional pitch to apply when focusing on the point.
908
- * Defaults to the current pitch if not specified.
930
+ * Focuses the map on a specific location.
931
+ * @param location - The location to focus on.
932
+ * @param zoomLevel - Optional zoom level for the map.
933
+ * @param bearing - Optional bearing (rotation) for the map.
934
+ * @param pitch - Optional pitch (tilt) for the map.
909
935
  */
910
936
  focusTo(location: BCLocation, zoomLevel?: number, bearing?: number | null, pitch?: number | null): void;
911
937
  /**
912
- * Updates the zoom level of the map view.
913
- * If the provided zoom level is invalid (not a number or out of range), retains the current zoom level.
914
- *
915
- * @param {number} zoomLevel - The desired zoom level. Must be within the map's minZoom and maxZoom range.
938
+ * Updates the zoom level of the map.
939
+ * @param zoomLevel - The desired zoom level.
916
940
  */
917
941
  updateZoom(zoomLevel: number): void;
918
942
  /**
919
- * Updates the pitch (tilt angle) of the map view.
920
- * If the provided pitch is invalid (not a number or out of range), retains the current pitch.
921
- *
922
- * @param {number} pitch - The desired pitch angle in degrees. Must be between 0 and 60.
923
- * Values outside this range will be clamped.
943
+ * Updates the pitch (tilt angle) of the map.
944
+ * @param pitch - The desired pitch angle in degrees.
924
945
  */
925
946
  updatePitch(pitch: number): void;
926
947
  /**
927
- * Updates the bearing (rotation angle) of the map view.
928
- * If the provided bearing is invalid (not a number), retains the current bearing.
929
- *
930
- * @param {number} bearing - The desired bearing angle in degrees.
931
- * The value is normalized to a range of 0 to 360 degrees.
948
+ * Updates the bearing (rotation angle) of the map.
949
+ * @param bearing - The desired bearing angle in degrees.
932
950
  */
933
951
  updateBearing(bearing: number): void;
934
952
  /**
935
953
  * Selects and displays the specified floor on the map.
936
- *
937
- * @param floor - The BCMapFloor object representing the floor to be selected.
938
- *
939
- * Preconditions:
940
- * - The `floor` parameter must be a valid BCMapFloor instance.
941
- *
942
- * Example:
943
- * selectFloor(groundFloorMap);
954
+ * @param floor - The floor to be selected.
944
955
  */
945
956
  selectFloor(floor: BCMapFloor): void;
957
+ /**
958
+ * Retrieves the currently selected floor.
959
+ * @returns The currently selected floor.
960
+ */
946
961
  get floor(): BCMapFloor;
947
962
  /**
948
963
  * Retrieves all available categories.
949
- * @returns An array of `BCCategory` objects representing all stored categories.
964
+ * @returns An array of categories.
950
965
  */
951
966
  getCategories(): BCCategory[];
952
967
  /**
953
968
  * Retrieves all available locations.
954
- * @returns An array of `BCLocation` objects representing all stored locations.
969
+ * @returns An array of locations.
955
970
  */
956
971
  getLocations(): BCLocation[];
972
+ /**
973
+ * Retrieves all amenity locations.
974
+ * @returns An array of amenity locations.
975
+ */
957
976
  getAllAminityLocations(): BCLocation[];
958
977
  /**
959
- * Searches for locations that match the provided search string.
960
- *
961
- * @param searchString - The string input used to match against location names or tags.
962
- * @param callback - A function to execute once the matching process is complete,
963
- * receiving an array of matched `BCLocation` objects.
978
+ * Searches for locations matching the provided search string.
979
+ * @param searchString - The string to search for.
980
+ * @param callback - A callback function to handle the search results.
964
981
  */
965
982
  searchForLocations(searchString: string, callback: (matches: BCLocation[]) => void): void;
966
983
  /**
967
- * Searches for categories that match the provided search string.
968
- *
969
- * @param searchString - The string input used to match against location names or tags.
970
- * @param callback - A function to execute once the matching process is complete,
971
- * receiving an array of matched `BCCategory` objects.
984
+ * Searches for categories matching the provided search string.
985
+ * @param searchString - The string to search for.
986
+ * @param callback - A callback function to handle the search results.
972
987
  */
973
988
  searchForCategories(searchString: string, callback: (matches: BCCategory[]) => void): void;
974
989
  /**
975
- * Selects the specified location on the map.
976
- *
977
- * @param location - The BCLocation object representing the POI to be selected.
978
- *
979
- * Preconditions:
980
- * - The `floor` parameter must be a valid BCLocation instance.
981
- *
982
- * Example:
983
- * selectLocation(location);
990
+ * Selects a specific location on the map.
991
+ * @param location - The location to select.
984
992
  */
985
993
  selectLocation(location: BCLocation): void;
986
994
  /**
987
- * Retrieves all available happenings.
988
- * @returns An array of `BCHappenings` objects.
995
+ * Retrieves all available happenings of a specific type.
996
+ * @param type - The type of happenings to retrieve.
997
+ * @returns An array of happenings.
989
998
  */
990
999
  getHappenings(type: BCHappeningType): BCHappenings[];
991
1000
  /**
992
- * Retrieves the session ID.
993
- * @returns A promise that resolves to a string session ID.
1001
+ * Retrieves the session ID for the current map view.
1002
+ * @returns A promise that resolves to the session ID.
994
1003
  */
995
1004
  getSessionId(): Promise<string>;
996
1005
  /**
997
- * Retrieves the suggestions based on user answers.
998
- * @returns A promise that returns a list of event IDs.
1006
+ * Retrieves event suggestions based on user answers.
1007
+ * @param sessionId - The session ID.
1008
+ * @param answers - The user's answers.
1009
+ * @returns A promise that resolves to a list of event IDs.
999
1010
  */
1000
1011
  getEventSuggestions(sessionId: string, answers: BCAnswer[]): Promise<string[]>;
1001
1012
  /**
1002
1013
  * Retrieves all available questions.
1003
- * @returns An array of `BCQuestion` objects.
1014
+ * @returns An array of questions.
1004
1015
  */
1005
1016
  getQuestions(): BCQuestion[];
1006
1017
  /**
1007
1018
  * Retrieves all available amenities.
1008
- * @returns An array of `BCSiteAmenity` objects representing all map amenities.
1019
+ * @returns An array of amenities.
1009
1020
  */
1010
1021
  getAmenities(): BCSiteAmenity[];
1011
1022
  /**
1012
- * Selects the specified amenities on the map.
1013
- *
1014
- * @param amenityType - The BCSiteAmenity representing type of POI to be selected.
1015
- *
1016
- * Example:
1017
- * selectAmenities(BCSiteAmenity.RESTROOM);
1023
+ * Selects a specific amenity type on the map.
1024
+ * @param amenityType - The type of amenity to select.
1018
1025
  */
1019
1026
  selectAmenities(amenityType: BCSiteAmenity): void;
1020
1027
  /**
1021
1028
  * Enables or disables multi-selection mode for locations.
1022
- *
1023
- * When multi-selection is enabled, multiple locations can be selected at the same time.
1024
- * When disabled, only the most recently selected location is kept in the selection.
1025
- *
1026
- * @param {boolean} [enable=true] - Whether to enable or disable multi-selection.
1027
- * Defaults to `true` (enable).
1029
+ * @param enable - Whether to enable or disable multi-selection.
1028
1030
  */
1029
1031
  enableMultiSelection(enable?: boolean): void;
1030
1032
  /**
1031
- * Clears any current selections in the map or application.
1032
- * This method resets the selection state, removing highlights
1033
- * or selected features and ensuring a clean slate for new selections.
1033
+ * Clears all current selections on the map.
1034
1034
  */
1035
1035
  clearSelection(): void;
1036
1036
  /**
1037
- * @hidden
1038
- * @internal
1039
- * Retrieves the step node.
1037
+ * Sets the map bounds to the specified southwest and northeast coordinates.
1038
+ * @param sw - The southwest coordinates.
1039
+ * @param ne - The northeast coordinates.
1040
1040
  */
1041
1041
  setBounds(sw: [
1042
1042
  number,
@@ -1046,13 +1046,13 @@ export declare class BCMapView {
1046
1046
  number
1047
1047
  ]): void;
1048
1048
  /**
1049
- * Reset Default Viewport with the provided options.
1050
- * @param newOptions Partial BCMapViewOptions to update the viewport.
1049
+ * Resets the default viewport with the provided options.
1050
+ * @param newOptions - Partial options to update the viewport.
1051
1051
  */
1052
1052
  resetDefaultViewport(newOptions?: Partial<BCMapViewOptions>): void;
1053
1053
  /**
1054
- * Sets the viewport with the provided options without changing the defaulf values.
1055
- * @param newOptions Partial BCMapViewOptions to update the viewport.
1054
+ * Sets the viewport with the provided options without changing the default values.
1055
+ * @param newOptions - Partial options to update the viewport.
1056
1056
  */
1057
1057
  setViewport(newOptions: Partial<BCMapViewOptions>): void;
1058
1058
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "becomap",
3
- "version": "1.5.64",
3
+ "version": "1.5.66",
4
4
  "description": "we lib to display becomap",
5
5
  "main": "lib/becomap.js",
6
6
  "module": "lib/becomap.js",