becomap 1.4.1 → 1.4.3
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 +86 -27
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -223,7 +223,8 @@ declare enum BCLocationType {
|
|
|
223
223
|
/** Represents a shuttle service or shuttle stop. */
|
|
224
224
|
SHUTTLE = "SHUTTLE",
|
|
225
225
|
/** Represents a kiosk, such as an information booth or ticket counter. */
|
|
226
|
-
KIOSK = "KIOSK"
|
|
226
|
+
KIOSK = "KIOSK",
|
|
227
|
+
MAP_OBJECT = "MAP_OBJECT"
|
|
227
228
|
}
|
|
228
229
|
/**
|
|
229
230
|
* Enum representing various amenities available at a site.
|
|
@@ -764,6 +765,52 @@ export interface BCHappenings {
|
|
|
764
765
|
*/
|
|
765
766
|
priority: number;
|
|
766
767
|
}
|
|
768
|
+
declare enum BCQuestionType {
|
|
769
|
+
/** Represents a multiple-choice question with a single answer. */
|
|
770
|
+
MCQ_SINGLE_ANSWER = "MCQ_SINGLE_ANSWER",
|
|
771
|
+
/** Represents an open-ended text response. */
|
|
772
|
+
TEXT = "TEXT",
|
|
773
|
+
/** Represents a numerical response. */
|
|
774
|
+
NUMBER = "NUMBER",
|
|
775
|
+
/** Represents a boolean (true/false) response. */
|
|
776
|
+
BOOLEAN = "BOOLEAN"
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Interface representing a single survey question.
|
|
780
|
+
*/
|
|
781
|
+
export interface BCQuestion {
|
|
782
|
+
/**
|
|
783
|
+
* Unique identifier for the question.
|
|
784
|
+
*/
|
|
785
|
+
id: string;
|
|
786
|
+
/**
|
|
787
|
+
* The text of the question.
|
|
788
|
+
*/
|
|
789
|
+
question: string;
|
|
790
|
+
/**
|
|
791
|
+
* The type of the question, as defined in BCQuestionType.
|
|
792
|
+
*/
|
|
793
|
+
type: BCQuestionType;
|
|
794
|
+
/**
|
|
795
|
+
* The list of possible options for multiple-choice questions.
|
|
796
|
+
* Should be empty or undefined for non-MCQ question types.
|
|
797
|
+
*/
|
|
798
|
+
options?: string[];
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Interface representing an answer to a survey question.
|
|
802
|
+
*/
|
|
803
|
+
export interface BCAnswer {
|
|
804
|
+
/**
|
|
805
|
+
* Unique identifier for the question being answered.
|
|
806
|
+
*/
|
|
807
|
+
questionId: string;
|
|
808
|
+
/**
|
|
809
|
+
* The answers provided by the user.
|
|
810
|
+
* This can be a list to accommodate multiple responses for certain question types.
|
|
811
|
+
*/
|
|
812
|
+
answers: string[];
|
|
813
|
+
}
|
|
767
814
|
/**
|
|
768
815
|
* Options for configuring the initial view of the map.
|
|
769
816
|
*
|
|
@@ -772,10 +819,10 @@ export interface BCHappenings {
|
|
|
772
819
|
*/
|
|
773
820
|
export interface BCMapViewOptions {
|
|
774
821
|
/**
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
822
|
+
* The geographical center point of the map, represented as a
|
|
823
|
+
* BCMapCoordinateLike object. If not specified, the map will
|
|
824
|
+
* default to its predefined center.
|
|
825
|
+
*/
|
|
779
826
|
center?: BCMapCoordinateLike;
|
|
780
827
|
/**
|
|
781
828
|
* The zoom level of the map, which determines the scale of the map
|
|
@@ -785,17 +832,17 @@ export interface BCMapViewOptions {
|
|
|
785
832
|
*/
|
|
786
833
|
zoom?: number;
|
|
787
834
|
/**
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
835
|
+
* The pitch of the map view, which controls the vertical tilt angle
|
|
836
|
+
* of the map. A pitch of 0 indicates a flat, bird's-eye view, while
|
|
837
|
+
* higher values provide an angled perspective. Default pitch can be
|
|
838
|
+
* set in the implementation.
|
|
839
|
+
*/
|
|
793
840
|
pitch?: number;
|
|
794
841
|
/**
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
842
|
+
* The bearing of the map view, which specifies the rotation angle
|
|
843
|
+
* of the map in degrees. A bearing of 0 means north is at the top.
|
|
844
|
+
* Default bearing can be defined in the implementation.
|
|
845
|
+
*/
|
|
799
846
|
bearing?: number;
|
|
800
847
|
}
|
|
801
848
|
/**
|
|
@@ -807,9 +854,6 @@ export declare class BCMapView {
|
|
|
807
854
|
readonly mapSite: BCMapSite;
|
|
808
855
|
readonly eventsHandler: BCEventEmitter<BCMapViewEvents>;
|
|
809
856
|
get currentFloor(): BCMapFloor;
|
|
810
|
-
private _camera;
|
|
811
|
-
private _scene;
|
|
812
|
-
private _renderer;
|
|
813
857
|
/**
|
|
814
858
|
* Constructs a new MapView instance.
|
|
815
859
|
*
|
|
@@ -828,7 +872,7 @@ export declare class BCMapView {
|
|
|
828
872
|
* Provides access to the route controller, which manages routing operations
|
|
829
873
|
* within the map view, such as route rendering.
|
|
830
874
|
* @returns An instance of BCRouteController for managing route operations.
|
|
831
|
-
|
|
875
|
+
*/
|
|
832
876
|
get routeController(): BCRouteController;
|
|
833
877
|
/**
|
|
834
878
|
* Focuses the map on a specified location, optionally adjusting
|
|
@@ -848,15 +892,15 @@ export declare class BCMapView {
|
|
|
848
892
|
* If the provided zoom level is invalid (not a number or out of range), retains the current zoom level.
|
|
849
893
|
*
|
|
850
894
|
* @param {number} zoomLevel - The desired zoom level. Must be within the map's minZoom and maxZoom range.
|
|
851
|
-
|
|
895
|
+
*/
|
|
852
896
|
updateZoom(zoomLevel: number): void;
|
|
853
897
|
/**
|
|
854
898
|
* Updates the pitch (tilt angle) of the map view.
|
|
855
899
|
* If the provided pitch is invalid (not a number or out of range), retains the current pitch.
|
|
856
|
-
|
|
900
|
+
*
|
|
857
901
|
* @param {number} pitch - The desired pitch angle in degrees. Must be between 0 and 60.
|
|
858
902
|
* Values outside this range will be clamped.
|
|
859
|
-
|
|
903
|
+
*/
|
|
860
904
|
updatePitch(pitch: number): void;
|
|
861
905
|
/**
|
|
862
906
|
* Updates the bearing (rotation angle) of the map view.
|
|
@@ -864,7 +908,7 @@ export declare class BCMapView {
|
|
|
864
908
|
*
|
|
865
909
|
* @param {number} bearing - The desired bearing angle in degrees.
|
|
866
910
|
* The value is normalized to a range of 0 to 360 degrees.
|
|
867
|
-
|
|
911
|
+
*/
|
|
868
912
|
updateBearing(bearing: number): void;
|
|
869
913
|
/**
|
|
870
914
|
* Selects and displays the specified floor on the map.
|
|
@@ -876,7 +920,7 @@ export declare class BCMapView {
|
|
|
876
920
|
*
|
|
877
921
|
* Example:
|
|
878
922
|
* selectFloor(groundFloorMap);
|
|
879
|
-
|
|
923
|
+
*/
|
|
880
924
|
selectFloor(floor: BCMapFloor): void;
|
|
881
925
|
get floor(): BCMapFloor;
|
|
882
926
|
/**
|
|
@@ -916,13 +960,28 @@ export declare class BCMapView {
|
|
|
916
960
|
*
|
|
917
961
|
* Example:
|
|
918
962
|
* selectLocation(location);
|
|
919
|
-
|
|
963
|
+
*/
|
|
920
964
|
selectLocation(location: BCLocation): void;
|
|
921
965
|
/**
|
|
922
966
|
* Retrieves all available happenings.
|
|
923
967
|
* @returns An array of `BCHappenings` objects.
|
|
924
968
|
*/
|
|
925
969
|
getHappenings(type: BCHappeningType): BCHappenings[];
|
|
970
|
+
/**
|
|
971
|
+
* Retrieves the session ID.
|
|
972
|
+
* @returns A promise that resolves to a string session ID.
|
|
973
|
+
*/
|
|
974
|
+
getSessionId(): Promise<string>;
|
|
975
|
+
/**
|
|
976
|
+
* Retrieves the suggestions based on user answers.
|
|
977
|
+
* @returns A promise that returns a list of event IDs.
|
|
978
|
+
*/
|
|
979
|
+
getEventSuggestions(sessionId: string, answers: BCAnswer[]): Promise<string[]>;
|
|
980
|
+
/**
|
|
981
|
+
* Retrieves all available questions.
|
|
982
|
+
* @returns An array of `BCQuestion` objects.
|
|
983
|
+
*/
|
|
984
|
+
getQuestions(): BCQuestion[];
|
|
926
985
|
/**
|
|
927
986
|
* Retrieves all available amenities.
|
|
928
987
|
* @returns An array of `BCSiteAmenity` objects representing all map amenities.
|
|
@@ -935,7 +994,7 @@ export declare class BCMapView {
|
|
|
935
994
|
*
|
|
936
995
|
* Example:
|
|
937
996
|
* selectAmenities(BCSiteAmenity.RESTROOM);
|
|
938
|
-
|
|
997
|
+
*/
|
|
939
998
|
selectAmenities(amenityType: BCSiteAmenity): void;
|
|
940
999
|
/**
|
|
941
1000
|
* Enables or disables multi-selection mode for locations.
|
|
@@ -945,13 +1004,13 @@ export declare class BCMapView {
|
|
|
945
1004
|
*
|
|
946
1005
|
* @param {boolean} [enable=true] - Whether to enable or disable multi-selection.
|
|
947
1006
|
* Defaults to `true` (enable).
|
|
948
|
-
|
|
1007
|
+
*/
|
|
949
1008
|
enableMultiSelection(enable?: boolean): void;
|
|
950
1009
|
/**
|
|
951
1010
|
* Clears any current selections in the map or application.
|
|
952
1011
|
* This method resets the selection state, removing highlights
|
|
953
1012
|
* or selected features and ensuring a clean slate for new selections.
|
|
954
|
-
|
|
1013
|
+
*/
|
|
955
1014
|
clearSelection(): void;
|
|
956
1015
|
/**
|
|
957
1016
|
* @hidden
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "becomap",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "we lib to display becomap",
|
|
5
5
|
"main": "lib/becomap.js",
|
|
6
6
|
"module": "lib/becomap.js",
|
|
@@ -66,4 +66,4 @@
|
|
|
66
66
|
"three": "^0.172.0",
|
|
67
67
|
"troika-three-text": "^0.52.3"
|
|
68
68
|
}
|
|
69
|
-
}
|
|
69
|
+
}
|