becomap 1.5.64 → 1.6.0
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/becomap.js +1 -1
- package/lib/index.d.ts +90 -104
- package/package.json +1 -1
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
|
-
|
|
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
|
*
|
|
@@ -867,176 +889,140 @@ export interface BCMapViewOptions {
|
|
|
867
889
|
bearing?: number;
|
|
868
890
|
}
|
|
869
891
|
/**
|
|
870
|
-
*
|
|
871
|
-
*
|
|
892
|
+
* Interface representing the public API of the BCMapView class.
|
|
893
|
+
* This interface defines all the public methods and properties
|
|
894
|
+
* available for interacting with the map view.
|
|
872
895
|
*/
|
|
873
|
-
export
|
|
874
|
-
#private;
|
|
875
|
-
readonly mapSite: BCMapSite;
|
|
876
|
-
readonly eventsHandler: BCEventEmitter<BCMapViewEvents>;
|
|
877
|
-
get currentFloor(): BCMapFloor;
|
|
896
|
+
export interface BCMapView {
|
|
878
897
|
/**
|
|
879
|
-
*
|
|
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.
|
|
898
|
+
* The site associated with the map view.
|
|
884
899
|
*/
|
|
885
|
-
|
|
900
|
+
readonly mapSite: BCMapSite;
|
|
886
901
|
/**
|
|
887
|
-
*
|
|
888
|
-
*
|
|
889
|
-
* @returns The HTMLElement representing the map container.
|
|
902
|
+
* The currently selected floor in the map view.
|
|
890
903
|
*/
|
|
891
|
-
|
|
904
|
+
readonly currentFloor: BCMapFloor;
|
|
892
905
|
/**
|
|
893
|
-
*
|
|
894
|
-
* within the map view, such as route rendering.
|
|
895
|
-
* @returns An instance of BCRouteController for managing route operations.
|
|
906
|
+
* Event handler for managing map-related events.
|
|
896
907
|
*/
|
|
908
|
+
readonly eventsHandler: BCEventEmitter<BCMapViewEvents>;
|
|
909
|
+
/**
|
|
910
|
+
* Provides access to the route controller, which manages routing operations
|
|
911
|
+
* within the map view, such as route rendering.
|
|
912
|
+
* @returns An instance of BCRouteController for managing route operations.
|
|
913
|
+
*/
|
|
897
914
|
get routeController(): BCRouteController;
|
|
898
915
|
/**
|
|
899
|
-
* Focuses the map on a
|
|
900
|
-
*
|
|
901
|
-
*
|
|
902
|
-
* @param
|
|
903
|
-
* @param
|
|
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.
|
|
916
|
+
* Focuses the map on a specific location.
|
|
917
|
+
* @param location - The location to focus on.
|
|
918
|
+
* @param zoomLevel - Optional zoom level for the map.
|
|
919
|
+
* @param bearing - Optional bearing (rotation) for the map.
|
|
920
|
+
* @param pitch - Optional pitch (tilt) for the map.
|
|
909
921
|
*/
|
|
910
922
|
focusTo(location: BCLocation, zoomLevel?: number, bearing?: number | null, pitch?: number | null): void;
|
|
911
923
|
/**
|
|
912
|
-
* Updates the zoom level of the map
|
|
913
|
-
*
|
|
914
|
-
*
|
|
915
|
-
* @param {number} zoomLevel - The desired zoom level. Must be within the map's minZoom and maxZoom range.
|
|
924
|
+
* Updates the zoom level of the map.
|
|
925
|
+
* @param zoomLevel - The desired zoom level.
|
|
916
926
|
*/
|
|
917
927
|
updateZoom(zoomLevel: number): void;
|
|
918
928
|
/**
|
|
919
|
-
* Updates the pitch (tilt angle) of the map
|
|
920
|
-
*
|
|
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.
|
|
929
|
+
* Updates the pitch (tilt angle) of the map.
|
|
930
|
+
* @param pitch - The desired pitch angle in degrees.
|
|
924
931
|
*/
|
|
925
932
|
updatePitch(pitch: number): void;
|
|
926
933
|
/**
|
|
927
|
-
* Updates the bearing (rotation angle) of the map
|
|
928
|
-
*
|
|
929
|
-
*
|
|
930
|
-
* @param {number} bearing - The desired bearing angle in degrees.
|
|
931
|
-
* The value is normalized to a range of 0 to 360 degrees.
|
|
934
|
+
* Updates the bearing (rotation angle) of the map.
|
|
935
|
+
* @param bearing - The desired bearing angle in degrees.
|
|
932
936
|
*/
|
|
933
937
|
updateBearing(bearing: number): void;
|
|
934
938
|
/**
|
|
935
939
|
* 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);
|
|
940
|
+
* @param floor - The floor to be selected.
|
|
944
941
|
*/
|
|
945
942
|
selectFloor(floor: BCMapFloor): void;
|
|
943
|
+
/**
|
|
944
|
+
* Retrieves the currently selected floor.
|
|
945
|
+
* @returns The currently selected floor.
|
|
946
|
+
*/
|
|
946
947
|
get floor(): BCMapFloor;
|
|
947
948
|
/**
|
|
948
949
|
* Retrieves all available categories.
|
|
949
|
-
* @returns An array of
|
|
950
|
+
* @returns An array of categories.
|
|
950
951
|
*/
|
|
951
952
|
getCategories(): BCCategory[];
|
|
952
953
|
/**
|
|
953
954
|
* Retrieves all available locations.
|
|
954
|
-
* @returns An array of
|
|
955
|
+
* @returns An array of locations.
|
|
955
956
|
*/
|
|
956
957
|
getLocations(): BCLocation[];
|
|
958
|
+
/**
|
|
959
|
+
* Retrieves all amenity locations.
|
|
960
|
+
* @returns An array of amenity locations.
|
|
961
|
+
*/
|
|
957
962
|
getAllAminityLocations(): BCLocation[];
|
|
958
963
|
/**
|
|
959
|
-
* Searches for locations
|
|
960
|
-
*
|
|
961
|
-
* @param
|
|
962
|
-
* @param callback - A function to execute once the matching process is complete,
|
|
963
|
-
* receiving an array of matched `BCLocation` objects.
|
|
964
|
+
* Searches for locations matching the provided search string.
|
|
965
|
+
* @param searchString - The string to search for.
|
|
966
|
+
* @param callback - A callback function to handle the search results.
|
|
964
967
|
*/
|
|
965
968
|
searchForLocations(searchString: string, callback: (matches: BCLocation[]) => void): void;
|
|
966
969
|
/**
|
|
967
|
-
* Searches for categories
|
|
968
|
-
*
|
|
969
|
-
* @param
|
|
970
|
-
* @param callback - A function to execute once the matching process is complete,
|
|
971
|
-
* receiving an array of matched `BCCategory` objects.
|
|
970
|
+
* Searches for categories matching the provided search string.
|
|
971
|
+
* @param searchString - The string to search for.
|
|
972
|
+
* @param callback - A callback function to handle the search results.
|
|
972
973
|
*/
|
|
973
974
|
searchForCategories(searchString: string, callback: (matches: BCCategory[]) => void): void;
|
|
974
975
|
/**
|
|
975
|
-
* Selects
|
|
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);
|
|
976
|
+
* Selects a specific location on the map.
|
|
977
|
+
* @param location - The location to select.
|
|
984
978
|
*/
|
|
985
979
|
selectLocation(location: BCLocation): void;
|
|
986
980
|
/**
|
|
987
|
-
* Retrieves all available happenings.
|
|
988
|
-
* @
|
|
981
|
+
* Retrieves all available happenings of a specific type.
|
|
982
|
+
* @param type - The type of happenings to retrieve.
|
|
983
|
+
* @returns An array of happenings.
|
|
989
984
|
*/
|
|
990
985
|
getHappenings(type: BCHappeningType): BCHappenings[];
|
|
991
986
|
/**
|
|
992
|
-
* Retrieves the session ID.
|
|
993
|
-
* @returns A promise that resolves to
|
|
987
|
+
* Retrieves the session ID for the current map view.
|
|
988
|
+
* @returns A promise that resolves to the session ID.
|
|
994
989
|
*/
|
|
995
990
|
getSessionId(): Promise<string>;
|
|
996
991
|
/**
|
|
997
|
-
* Retrieves
|
|
998
|
-
* @
|
|
992
|
+
* Retrieves event suggestions based on user answers.
|
|
993
|
+
* @param sessionId - The session ID.
|
|
994
|
+
* @param answers - The user's answers.
|
|
995
|
+
* @returns A promise that resolves to a list of event IDs.
|
|
999
996
|
*/
|
|
1000
997
|
getEventSuggestions(sessionId: string, answers: BCAnswer[]): Promise<string[]>;
|
|
1001
998
|
/**
|
|
1002
999
|
* Retrieves all available questions.
|
|
1003
|
-
* @returns An array of
|
|
1000
|
+
* @returns An array of questions.
|
|
1004
1001
|
*/
|
|
1005
1002
|
getQuestions(): BCQuestion[];
|
|
1006
1003
|
/**
|
|
1007
1004
|
* Retrieves all available amenities.
|
|
1008
|
-
* @returns An array of
|
|
1005
|
+
* @returns An array of amenities.
|
|
1009
1006
|
*/
|
|
1010
1007
|
getAmenities(): BCSiteAmenity[];
|
|
1011
1008
|
/**
|
|
1012
|
-
* Selects
|
|
1013
|
-
*
|
|
1014
|
-
* @param amenityType - The BCSiteAmenity representing type of POI to be selected.
|
|
1015
|
-
*
|
|
1016
|
-
* Example:
|
|
1017
|
-
* selectAmenities(BCSiteAmenity.RESTROOM);
|
|
1009
|
+
* Selects a specific amenity type on the map.
|
|
1010
|
+
* @param amenityType - The type of amenity to select.
|
|
1018
1011
|
*/
|
|
1019
1012
|
selectAmenities(amenityType: BCSiteAmenity): void;
|
|
1020
1013
|
/**
|
|
1021
1014
|
* 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).
|
|
1015
|
+
* @param enable - Whether to enable or disable multi-selection.
|
|
1028
1016
|
*/
|
|
1029
1017
|
enableMultiSelection(enable?: boolean): void;
|
|
1030
1018
|
/**
|
|
1031
|
-
* Clears
|
|
1032
|
-
* This method resets the selection state, removing highlights
|
|
1033
|
-
* or selected features and ensuring a clean slate for new selections.
|
|
1019
|
+
* Clears all current selections on the map.
|
|
1034
1020
|
*/
|
|
1035
1021
|
clearSelection(): void;
|
|
1036
1022
|
/**
|
|
1037
|
-
*
|
|
1038
|
-
* @
|
|
1039
|
-
*
|
|
1023
|
+
* Sets the map bounds to the specified southwest and northeast coordinates.
|
|
1024
|
+
* @param sw - The southwest coordinates.
|
|
1025
|
+
* @param ne - The northeast coordinates.
|
|
1040
1026
|
*/
|
|
1041
1027
|
setBounds(sw: [
|
|
1042
1028
|
number,
|
|
@@ -1046,13 +1032,13 @@ export declare class BCMapView {
|
|
|
1046
1032
|
number
|
|
1047
1033
|
]): void;
|
|
1048
1034
|
/**
|
|
1049
|
-
*
|
|
1050
|
-
* @param newOptions Partial
|
|
1035
|
+
* Resets the default viewport with the provided options.
|
|
1036
|
+
* @param newOptions - Partial options to update the viewport.
|
|
1051
1037
|
*/
|
|
1052
1038
|
resetDefaultViewport(newOptions?: Partial<BCMapViewOptions>): void;
|
|
1053
1039
|
/**
|
|
1054
|
-
* Sets the viewport with the provided options without changing the
|
|
1055
|
-
* @param newOptions Partial
|
|
1040
|
+
* Sets the viewport with the provided options without changing the default values.
|
|
1041
|
+
* @param newOptions - Partial options to update the viewport.
|
|
1056
1042
|
*/
|
|
1057
1043
|
setViewport(newOptions: Partial<BCMapViewOptions>): void;
|
|
1058
1044
|
}
|