becomap 1.5.64 → 1.5.65
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 +104 -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
|
*
|
|
@@ -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
|
-
*
|
|
871
|
-
*
|
|
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
|
|
874
|
-
#private;
|
|
875
|
-
readonly mapSite: BCMapSite;
|
|
876
|
-
readonly eventsHandler: BCEventEmitter<BCMapViewEvents>;
|
|
877
|
-
get currentFloor(): BCMapFloor;
|
|
910
|
+
export interface BCMapView {
|
|
878
911
|
/**
|
|
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.
|
|
912
|
+
* The site associated with the map view.
|
|
884
913
|
*/
|
|
885
|
-
|
|
914
|
+
readonly mapSite: BCMapSite;
|
|
886
915
|
/**
|
|
887
|
-
*
|
|
888
|
-
*
|
|
889
|
-
* @returns The HTMLElement representing the map container.
|
|
916
|
+
* The currently selected floor in the map view.
|
|
890
917
|
*/
|
|
891
|
-
|
|
918
|
+
readonly currentFloor: BCMapFloor;
|
|
892
919
|
/**
|
|
893
|
-
*
|
|
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
|
|
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.
|
|
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
|
|
913
|
-
*
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
960
|
-
*
|
|
961
|
-
* @param
|
|
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
|
|
968
|
-
*
|
|
969
|
-
* @param
|
|
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
|
|
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
|
-
* @
|
|
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
|
|
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
|
|
998
|
-
* @
|
|
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
|
|
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
|
|
1019
|
+
* @returns An array of amenities.
|
|
1009
1020
|
*/
|
|
1010
1021
|
getAmenities(): BCSiteAmenity[];
|
|
1011
1022
|
/**
|
|
1012
|
-
* Selects
|
|
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
|
|
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
|
-
*
|
|
1038
|
-
* @
|
|
1039
|
-
*
|
|
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
|
-
*
|
|
1050
|
-
* @param newOptions Partial
|
|
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
|
|
1055
|
-
* @param newOptions Partial
|
|
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
|
}
|