@mapsindoors/react-native-maps-indoors-mapbox 2.6.0 → 2.6.1
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/README.md +2 -2
- package/android/build.gradle +1 -1
- package/package.json +1 -1
- package/react-native-maps-indoors-mapbox.podspec +2 -2
- package/android/src/main/java/com/mapsindoorsrn/core/DirectionsRendererModule.java +0 -322
- package/android/src/main/java/com/mapsindoorsrn/core/DirectionsServiceModule.java +0 -166
- package/android/src/main/java/com/mapsindoorsrn/core/MPDisplayRuleModule.java +0 -1699
- package/android/src/main/java/com/mapsindoorsrn/core/MapControlModule.java +0 -761
- package/android/src/main/java/com/mapsindoorsrn/core/MapsIndoorsModule.java +0 -410
- package/android/src/main/java/com/mapsindoorsrn/core/RCMapView.java +0 -16
- package/android/src/main/java/com/mapsindoorsrn/core/README.md +0 -3
- package/android/src/main/java/com/mapsindoorsrn/core/UtilsModule.java +0 -227
- package/android/src/main/java/com/mapsindoorsrn/core/models/BitmapStopIconConfig.java +0 -22
- package/android/src/main/java/com/mapsindoorsrn/core/models/Bounds.java +0 -19
- package/android/src/main/java/com/mapsindoorsrn/core/models/Filter.java +0 -77
- package/android/src/main/java/com/mapsindoorsrn/core/models/Location.java +0 -17
- package/android/src/main/java/com/mapsindoorsrn/core/models/MPCameraPosition.java +0 -34
- package/android/src/main/java/com/mapsindoorsrn/core/models/MPCameraUpdate.java +0 -68
- package/android/src/main/java/com/mapsindoorsrn/core/models/MPError.java +0 -38
- package/android/src/main/java/com/mapsindoorsrn/core/models/PositionProvider.java +0 -46
- package/android/src/main/java/com/mapsindoorsrn/core/models/PositionResult.java +0 -117
- package/android/src/main/java/com/mapsindoorsrn/core/models/Query.java +0 -30
- package/android/src/main/java/com/mapsindoorsrn/core/models/RouteStopIconConfigModel.java +0 -35
- package/ios/core/CameraPosition.swift +0 -15
- package/ios/core/CameraUpdate.swift +0 -19
- package/ios/core/CameraUpdateError.swift +0 -11
- package/ios/core/DirectionsRendererBridge.m +0 -59
- package/ios/core/DirectionsRendererModule.swift +0 -359
- package/ios/core/DirectionsServiceBridge.m +0 -55
- package/ios/core/DirectionsServiceModule.swift +0 -186
- package/ios/core/IconStopUrl.swift +0 -17
- package/ios/core/LabelGraphic.swift +0 -15
- package/ios/core/MPDisplayRuleBridge.m +0 -696
- package/ios/core/MPDisplayRuleModule.swift +0 -1704
- package/ios/core/MapControlBridge.m +0 -213
- package/ios/core/MapControlModule.swift +0 -702
- package/ios/core/MapsIndoorsBridge.m +0 -128
- package/ios/core/MapsIndoorsData.swift +0 -288
- package/ios/core/MapsIndoorsModule.swift +0 -363
- package/ios/core/RCMapView.swift +0 -16
- package/ios/core/README.md +0 -3
- package/ios/core/ReactPositionProvider.swift +0 -27
- package/ios/core/RouteIcon.swift +0 -34
- package/ios/core/UtilsBridge.m +0 -73
- package/ios/core/UtilsModule.swift +0 -182
- package/ios/core/helpers.swift +0 -57
- package/src/core/EventNames.ts +0 -21
- package/src/core/MPAdditionalDetail.ts +0 -102
- package/src/core/MPBadgePosition.ts +0 -12
- package/src/core/MPBounds.ts +0 -155
- package/src/core/MPBuilding.ts +0 -333
- package/src/core/MPBuildingCollection.ts +0 -57
- package/src/core/MPBuildingInfo.ts +0 -63
- package/src/core/MPCameraEvent.ts +0 -17
- package/src/core/MPCameraEventListener.ts +0 -17
- package/src/core/MPCameraPosition.ts +0 -82
- package/src/core/MPCameraUpdate.ts +0 -174
- package/src/core/MPCameraViewFitMode.ts +0 -25
- package/src/core/MPCategory.ts +0 -85
- package/src/core/MPCategoryCollection.ts +0 -62
- package/src/core/MPCollection.ts +0 -59
- package/src/core/MPCollisionHandling.ts +0 -12
- package/src/core/MPDailyOpeningHours.ts +0 -67
- package/src/core/MPDataField.ts +0 -69
- package/src/core/MPDetailType.ts +0 -73
- package/src/core/MPDirectionsRenderer.ts +0 -238
- package/src/core/MPDirectionsService.ts +0 -152
- package/src/core/MPDisplayRule.ts +0 -1823
- package/src/core/MPEntity.ts +0 -60
- package/src/core/MPEntityInfo.ts +0 -28
- package/src/core/MPError.ts +0 -122
- package/src/core/MPFeatureTypes.ts +0 -8
- package/src/core/MPFilter.ts +0 -168
- package/src/core/MPFilterBehavior.ts +0 -115
- package/src/core/MPFloor.ts +0 -170
- package/src/core/MPFloorSelectorInterface.ts +0 -63
- package/src/core/MPGeometry.ts +0 -91
- package/src/core/MPHighlightBehavior.ts +0 -115
- package/src/core/MPHighway.ts +0 -14
- package/src/core/MPIconPlacement.ts +0 -13
- package/src/core/MPIconSize.ts +0 -39
- package/src/core/MPLabelGraphic.ts +0 -24
- package/src/core/MPLabelPosition.ts +0 -12
- package/src/core/MPLabelType.ts +0 -11
- package/src/core/MPLocation.ts +0 -440
- package/src/core/MPLocationPropertyNames.ts +0 -30
- package/src/core/MPLocationSettings.ts +0 -40
- package/src/core/MPLocationType.ts +0 -16
- package/src/core/MPMapConfig.ts +0 -280
- package/src/core/MPMapStyle.ts +0 -57
- package/src/core/MPMultiPolygon.ts +0 -218
- package/src/core/MPOpeningHours.ts +0 -48
- package/src/core/MPPOIType.ts +0 -43
- package/src/core/MPPoint.ts +0 -169
- package/src/core/MPPolygon.ts +0 -219
- package/src/core/MPPositionProviderInterface.ts +0 -45
- package/src/core/MPPositionResultInterface.ts +0 -42
- package/src/core/MPPropertyData.ts +0 -234
- package/src/core/MPQuery.ts +0 -69
- package/src/core/MPRoute.ts +0 -105
- package/src/core/MPRouteCoordinate.ts +0 -95
- package/src/core/MPRouteLeg.ts +0 -158
- package/src/core/MPRouteProperty.ts +0 -83
- package/src/core/MPRouteStep.ts +0 -186
- package/src/core/MPRouteStopIconConfig.ts +0 -82
- package/src/core/MPSelectionBehavior.ts +0 -114
- package/src/core/MPSelectionMode.ts +0 -4
- package/src/core/MPSettings3D.ts +0 -107
- package/src/core/MPSize.ts +0 -21
- package/src/core/MPSolution.ts +0 -189
- package/src/core/MPSolutionConfig.ts +0 -188
- package/src/core/MPSolutionDisplayRule.ts +0 -15
- package/src/core/MPUserRole.ts +0 -60
- package/src/core/MPUserRoleCollection.ts +0 -37
- package/src/core/MPUtils.ts +0 -178
- package/src/core/MPVenue.ts +0 -294
- package/src/core/MPVenueCollection.ts +0 -58
- package/src/core/MPVenueInfo.ts +0 -62
- package/src/core/MPWeeklyOpeningHours.ts +0 -129
- package/src/core/MapControl.ts +0 -961
- package/src/core/MapView.tsx +0 -34
- package/src/core/MapsIndoors.ts +0 -571
- package/src/core/OnBuildingFoundAtCameraTargetListener.ts +0 -17
- package/src/core/OnFloorSelectionChangedListener.ts +0 -17
- package/src/core/OnFloorUpdateListener.ts +0 -16
- package/src/core/OnLegSelectedListener.ts +0 -17
- package/src/core/OnLiveLocationUpdateListener.ts +0 -17
- package/src/core/OnLocationSelectedListener.ts +0 -17
- package/src/core/OnMapClickListener.ts +0 -20
- package/src/core/OnMarkerClickListener.ts +0 -17
- package/src/core/OnMarkerInfoWindowClickListener.ts +0 -17
- package/src/core/OnPositionUpdateListener.ts +0 -17
- package/src/core/OnVenueFoundAtCameraTargetListener.ts +0 -17
- package/src/core/README.md +0 -3
- package/src/core/RouteStopIconConfig.ts +0 -10
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { RouteStopIconConfig } from "./RouteStopIconConfig";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A class that creates a route stop icon for the {@link MPDirectionsRenderer}.
|
|
5
|
-
*
|
|
6
|
-
* @export
|
|
7
|
-
* @class MPRouteStopIconConfig
|
|
8
|
-
* @typedef {MPRouteStopIconConfig}
|
|
9
|
-
*/
|
|
10
|
-
export default class MPRouteStopIconConfig implements RouteStopIconConfig{
|
|
11
|
-
|
|
12
|
-
readonly numbered: boolean;
|
|
13
|
-
readonly label: string;
|
|
14
|
-
readonly color: string;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Creates an instance of MPRouteStopIconConfig.
|
|
18
|
-
*
|
|
19
|
-
* @constructor
|
|
20
|
-
* @private
|
|
21
|
-
* @param {Mode} mode
|
|
22
|
-
* @param {*} obj
|
|
23
|
-
*/
|
|
24
|
-
private constructor(numberd: boolean, label: string, color: string) {
|
|
25
|
-
this.numbered = numberd;
|
|
26
|
-
this.label = label;
|
|
27
|
-
this.color = color;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Internal
|
|
32
|
-
*
|
|
33
|
-
* @returns {URL}
|
|
34
|
-
*/
|
|
35
|
-
getImage(): URL {
|
|
36
|
-
return new URL(JSON.stringify(this));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Creator for MPRouteStopIconConfig, used to decode JSON from the MapsIndoors SDK.
|
|
41
|
-
*
|
|
42
|
-
* @static
|
|
43
|
-
* @param {MPRouteStopIconConfigParams} obj
|
|
44
|
-
* @returns {MPRouteStopIconConfig}
|
|
45
|
-
*/
|
|
46
|
-
static create(obj: MPRouteStopIconConfigParams): MPRouteStopIconConfig {
|
|
47
|
-
return new MPRouteStopIconConfig(
|
|
48
|
-
obj.numbered,
|
|
49
|
-
obj.label,
|
|
50
|
-
obj.color
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Parameter interface for {@link MPRouteStopIconConfig}.
|
|
57
|
-
*
|
|
58
|
-
* @export
|
|
59
|
-
* @interface MPRouteStopIconConfigParams
|
|
60
|
-
* @typedef {MPRouteStopIconConfigParams}
|
|
61
|
-
*/
|
|
62
|
-
export interface MPRouteStopIconConfigParams {
|
|
63
|
-
/**
|
|
64
|
-
* Whether the icon should be numbered.
|
|
65
|
-
*
|
|
66
|
-
* @type {boolean}
|
|
67
|
-
*/
|
|
68
|
-
numbered: boolean,
|
|
69
|
-
/**
|
|
70
|
-
* The label for the icon.
|
|
71
|
-
*
|
|
72
|
-
* @type {string}
|
|
73
|
-
*/
|
|
74
|
-
label: string,
|
|
75
|
-
/**
|
|
76
|
-
* The color for the icon.
|
|
77
|
-
*
|
|
78
|
-
* @type {string}
|
|
79
|
-
*/
|
|
80
|
-
color: string
|
|
81
|
-
}
|
|
82
|
-
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import MapControl from "../../index";
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Sets a behavior for the map when calling {@link MapControl#selectLocation}.
|
|
6
|
-
*
|
|
7
|
-
* Has a default behavior:
|
|
8
|
-
* * MoveCamera = false
|
|
9
|
-
* * ShowInfoWindow = false
|
|
10
|
-
* * AnimationDuration = 0
|
|
11
|
-
* * AllowFloorChange = false
|
|
12
|
-
* * ZoomToFit = true
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
|
-
* @class MPFilterBehavior
|
|
16
|
-
* @typedef {MPFilterBehavior}
|
|
17
|
-
*/
|
|
18
|
-
export default class MPSelectionBehavior {
|
|
19
|
-
/**
|
|
20
|
-
* Creates an instance of MPSelectionBehavior.
|
|
21
|
-
*
|
|
22
|
-
* @constructor
|
|
23
|
-
* @private
|
|
24
|
-
* @param {boolean} allowFloorChange
|
|
25
|
-
* @param {boolean} moveCamera
|
|
26
|
-
* @param {number} animationDuration
|
|
27
|
-
* @param {boolean} showInfoWindow
|
|
28
|
-
* @param {boolean} zoomToFit
|
|
29
|
-
* @param {number} maxZoom
|
|
30
|
-
*/
|
|
31
|
-
private constructor(
|
|
32
|
-
public allowFloorChange: boolean,
|
|
33
|
-
public moveCamera: boolean,
|
|
34
|
-
public animationDuration: number,
|
|
35
|
-
public showInfoWindow: boolean,
|
|
36
|
-
public zoomToFit: boolean,
|
|
37
|
-
public maxZoom?: number
|
|
38
|
-
) { }
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Creator for MPSelectionBehavior, used to decode JSON from the MapsIndoors SDK.
|
|
42
|
-
*
|
|
43
|
-
* @static
|
|
44
|
-
* @param {MPSelectionBehaviorParams} object
|
|
45
|
-
* @returns {MPSelectionBehavior}
|
|
46
|
-
*/
|
|
47
|
-
static create(object: MPSelectionBehaviorParams): MPSelectionBehavior {
|
|
48
|
-
if(Platform.OS === 'ios') {
|
|
49
|
-
return new MPSelectionBehavior(
|
|
50
|
-
object?.allowFloorChange ?? false,
|
|
51
|
-
object?.moveCamera ?? false,
|
|
52
|
-
object?.animationDuration ?? 0,
|
|
53
|
-
object?.showInfoWindow ?? false,
|
|
54
|
-
object?.zoomToFit ?? true,
|
|
55
|
-
object?.maxZoom ?? 999
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
return new MPSelectionBehavior(
|
|
59
|
-
object?.allowFloorChange ?? true,
|
|
60
|
-
object?.moveCamera ?? true,
|
|
61
|
-
object?.animationDuration ?? 500,
|
|
62
|
-
object?.showInfoWindow ?? true,
|
|
63
|
-
object?.zoomToFit ?? true,
|
|
64
|
-
object?.maxZoom
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Parameter interface for {@link MPSelectionBehavior}.
|
|
71
|
-
*
|
|
72
|
-
* @export
|
|
73
|
-
* @interface MPSelectionBehaviorParams
|
|
74
|
-
* @typedef {MPSelectionBehaviorParams}
|
|
75
|
-
*/
|
|
76
|
-
export interface MPSelectionBehaviorParams {
|
|
77
|
-
/**
|
|
78
|
-
* Whether the filtering is allowed to change the floor if no results are visible on the current floor.
|
|
79
|
-
*
|
|
80
|
-
* @type {?boolean}
|
|
81
|
-
*/
|
|
82
|
-
allowFloorChange?: boolean,
|
|
83
|
-
/**
|
|
84
|
-
* Whether the filtering should move the camera to encompass the results.
|
|
85
|
-
*
|
|
86
|
-
* @type {?boolean}
|
|
87
|
-
*/
|
|
88
|
-
moveCamera?: boolean,
|
|
89
|
-
/**
|
|
90
|
-
* How long the camera movement should be animated for, set to 0 disables animation.
|
|
91
|
-
*
|
|
92
|
-
* @type {?number}
|
|
93
|
-
*/
|
|
94
|
-
animationDuration?: number,
|
|
95
|
-
/**
|
|
96
|
-
* Whether to open the info window if a single result is returned.
|
|
97
|
-
*
|
|
98
|
-
* @type {?boolean}
|
|
99
|
-
*/
|
|
100
|
-
showInfoWindow?: boolean,
|
|
101
|
-
/**
|
|
102
|
-
* Whether the filtering is allowed to zoom in/out the camera.
|
|
103
|
-
*
|
|
104
|
-
* @type {?boolean}
|
|
105
|
-
*/
|
|
106
|
-
zoomToFit?: boolean,
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* The maximum zoom level to zoom to when zoomToFit is enabled.
|
|
110
|
-
*
|
|
111
|
-
* @type {?number}
|
|
112
|
-
*/
|
|
113
|
-
maxZoom?: number
|
|
114
|
-
}
|
package/src/core/MPSettings3D.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import MPUtils from "./MPUtils";
|
|
2
|
-
import { MPSolutionConfig } from "../../index"
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A configuration object that governs layer settings for 3D features.
|
|
6
|
-
*
|
|
7
|
-
* Can be aquired with {@link MPSolutionConfig.settings3D}.
|
|
8
|
-
*
|
|
9
|
-
* @export
|
|
10
|
-
* @class MPSettings3D
|
|
11
|
-
* @typedef {MPSettings3D}
|
|
12
|
-
*/
|
|
13
|
-
export default class MPSettings3D {
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Creates an instance of MPSettings3D.
|
|
17
|
-
*
|
|
18
|
-
* @constructor
|
|
19
|
-
* @private
|
|
20
|
-
* @param {?number} [_extrusionOpacity]
|
|
21
|
-
* @param {?number} [_wallOpacity]
|
|
22
|
-
*/
|
|
23
|
-
private constructor(
|
|
24
|
-
private _extrusionOpacity?: number,
|
|
25
|
-
private _wallOpacity?: number,
|
|
26
|
-
) { }
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Creator for MPSettings3D, used to decode JSON from the MapsIndoors SDK.
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
|
-
* @static
|
|
34
|
-
* @param {MPSettings3DParams} object
|
|
35
|
-
* @returns {MPSettings3D}
|
|
36
|
-
*/
|
|
37
|
-
public static create(object: MPSettings3DParams): MPSettings3D {
|
|
38
|
-
return new MPSettings3D(
|
|
39
|
-
object?.extrusionOpacity,
|
|
40
|
-
object?.wallOpacity,
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Set the opacity of extruded rooms.
|
|
46
|
-
*
|
|
47
|
-
* @public
|
|
48
|
-
* @type {number}
|
|
49
|
-
*/
|
|
50
|
-
public set extrusionOpacity(opacity: number) {
|
|
51
|
-
this._extrusionOpacity = opacity;
|
|
52
|
-
MPUtils.setExtrusionOpacity(opacity)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Get the opacity of extruded rooms.
|
|
57
|
-
*
|
|
58
|
-
* @public
|
|
59
|
-
* @type {number}
|
|
60
|
-
*/
|
|
61
|
-
public get extrusionOpacity(): number {
|
|
62
|
-
return this._extrusionOpacity!;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Set the opacity of extruded walls.
|
|
67
|
-
*
|
|
68
|
-
* @public
|
|
69
|
-
* @type {number}
|
|
70
|
-
*/
|
|
71
|
-
public set wallOpacity(opacity: number) {
|
|
72
|
-
this._wallOpacity = opacity;
|
|
73
|
-
MPUtils.setWallOpacity(opacity);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Get the opacity of extruded walls.
|
|
78
|
-
*
|
|
79
|
-
* @public
|
|
80
|
-
* @type {number}
|
|
81
|
-
*/
|
|
82
|
-
public get wallOpacity(): number {
|
|
83
|
-
return this._wallOpacity!;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Parameter interface for {@link MPSettings3D}.
|
|
89
|
-
*
|
|
90
|
-
* @export
|
|
91
|
-
* @interface MPSettings3DParams
|
|
92
|
-
* @typedef {MPSettings3DParams}
|
|
93
|
-
*/
|
|
94
|
-
export interface MPSettings3DParams {
|
|
95
|
-
/**
|
|
96
|
-
* The opacity of extruded rooms.
|
|
97
|
-
*
|
|
98
|
-
* @type {?number}
|
|
99
|
-
*/
|
|
100
|
-
extrusionOpacity?: number,
|
|
101
|
-
/**
|
|
102
|
-
* The opacity of extruded walls.
|
|
103
|
-
*
|
|
104
|
-
* @type {?number}
|
|
105
|
-
*/
|
|
106
|
-
wallOpacity?: number,
|
|
107
|
-
}
|
package/src/core/MPSize.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A container for a height/width pair.
|
|
3
|
-
*
|
|
4
|
-
* @export
|
|
5
|
-
* @interface MPSize
|
|
6
|
-
* @typedef {MPSize}
|
|
7
|
-
*/
|
|
8
|
-
export default interface MPSize {
|
|
9
|
-
/**
|
|
10
|
-
* Height.
|
|
11
|
-
*
|
|
12
|
-
* @type {number}
|
|
13
|
-
*/
|
|
14
|
-
height: number;
|
|
15
|
-
/**
|
|
16
|
-
* Width.
|
|
17
|
-
*
|
|
18
|
-
* @type {number}
|
|
19
|
-
*/
|
|
20
|
-
width: number;
|
|
21
|
-
}
|
package/src/core/MPSolution.ts
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { MPSolutionConfig } from "../../index";
|
|
2
|
-
import MPPOIType from "./MPPOIType";
|
|
3
|
-
import MPUtils from "./MPUtils";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Governs the topmost settings for a MapsIndoors solution.
|
|
7
|
-
*
|
|
8
|
-
* @export
|
|
9
|
-
* @class MPSolution
|
|
10
|
-
* @typedef {MPSolution}
|
|
11
|
-
*/
|
|
12
|
-
export default class MPSolution {
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Creates an instance of MPSolution.
|
|
16
|
-
*
|
|
17
|
-
* @constructor
|
|
18
|
-
* @private
|
|
19
|
-
* @param {string} id
|
|
20
|
-
* @param {string} name
|
|
21
|
-
* @param {MPSolutionConfig} solutionConfig
|
|
22
|
-
* @param {string} defaultLanguage
|
|
23
|
-
* @param {string[]} availableLanguages
|
|
24
|
-
* @param {string[]} modules
|
|
25
|
-
* @param {?string} [locationTemplates]
|
|
26
|
-
* @param {?string} [customerId]
|
|
27
|
-
* @param {?string} [mapClientUrl]
|
|
28
|
-
*/
|
|
29
|
-
private constructor(
|
|
30
|
-
public readonly id: string,
|
|
31
|
-
public readonly name: string,
|
|
32
|
-
public readonly solutionConfig: MPSolutionConfig,
|
|
33
|
-
public readonly defaultLanguage: string,
|
|
34
|
-
public readonly availableLanguages: string[],
|
|
35
|
-
private readonly modules: string[],
|
|
36
|
-
public readonly locationTemplates?: string,
|
|
37
|
-
public readonly customerId?: string,
|
|
38
|
-
public mapClientUrl?: string,
|
|
39
|
-
public readonly types?: MPPOIType[]
|
|
40
|
-
) { }
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Creator for MPSolution, used to decode JSON from the MapsIndoors SDK.
|
|
45
|
-
*
|
|
46
|
-
* @public
|
|
47
|
-
* @static
|
|
48
|
-
* @param {MPSolutionParams} object
|
|
49
|
-
* @returns {MPSolution}
|
|
50
|
-
*/
|
|
51
|
-
public static create(object: MPSolutionParams): MPSolution {
|
|
52
|
-
return new MPSolution(
|
|
53
|
-
object?.id,
|
|
54
|
-
object?.name,
|
|
55
|
-
MPSolutionConfig.create(object?.solutionConfig),
|
|
56
|
-
object?.defaultLanguage,
|
|
57
|
-
object?.availableLanguages,
|
|
58
|
-
object?.modules,
|
|
59
|
-
object?.locationTemplates,
|
|
60
|
-
object?.customerId,
|
|
61
|
-
object?.mapClientUrl,
|
|
62
|
-
object?.types?.map((type: any) => MPPOIType.create(type)),
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Check if the solution supports a language.
|
|
68
|
-
*
|
|
69
|
-
* @public
|
|
70
|
-
* @param {?string} [language]
|
|
71
|
-
* @returns {boolean}
|
|
72
|
-
*/
|
|
73
|
-
public hasLanguage(language?: string): boolean {
|
|
74
|
-
return language ? this.availableLanguages.includes(language) : false;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Check whether the 22nd zoom level is available for select map providers.
|
|
79
|
-
*
|
|
80
|
-
* @public
|
|
81
|
-
* @returns {boolean}
|
|
82
|
-
*/
|
|
83
|
-
public isZoom22Enabled(): boolean {
|
|
84
|
-
return this.modules.includes("z22");
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Check whether wall extrusions are available for select map providers.
|
|
89
|
-
*
|
|
90
|
-
* @public
|
|
91
|
-
* @returns {boolean}
|
|
92
|
-
*/
|
|
93
|
-
public is3DWallsEnabled(): boolean {
|
|
94
|
-
return this.modules.includes("3dwalls");
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Check whether room extrusions are available for select map providers.
|
|
99
|
-
*
|
|
100
|
-
* @public
|
|
101
|
-
* @returns {boolean}
|
|
102
|
-
*/
|
|
103
|
-
public is3DExtrusionsEnabled(): boolean {
|
|
104
|
-
return this.modules.includes("3dextrusions");
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Parses a venue ID and a location ID to create a mapClientUrl.
|
|
109
|
-
*
|
|
110
|
-
* @public
|
|
111
|
-
* @async
|
|
112
|
-
* @param {string} venueId
|
|
113
|
-
* @param {string} locationId
|
|
114
|
-
* @returns {Promise<string>}
|
|
115
|
-
*/
|
|
116
|
-
public async parseMapClient(venueId: string, locationId: string): Promise<string> {
|
|
117
|
-
return MPUtils.parseMapClientUrl(venueId, locationId);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Parameter interface for {@link MPSolution}.
|
|
123
|
-
*
|
|
124
|
-
* @export
|
|
125
|
-
* @interface MPSolutionParams
|
|
126
|
-
* @typedef {MPSolutionParams}
|
|
127
|
-
*/
|
|
128
|
-
export interface MPSolutionParams {
|
|
129
|
-
/**
|
|
130
|
-
* The solution's ID.
|
|
131
|
-
*
|
|
132
|
-
* @type {string}
|
|
133
|
-
*/
|
|
134
|
-
id: string;
|
|
135
|
-
/**
|
|
136
|
-
* The solution's name.
|
|
137
|
-
*
|
|
138
|
-
* @type {string}
|
|
139
|
-
*/
|
|
140
|
-
name: string;
|
|
141
|
-
/**
|
|
142
|
-
* The solution's configuration object.
|
|
143
|
-
*
|
|
144
|
-
* @type {MPSolutionConfig}
|
|
145
|
-
*/
|
|
146
|
-
solutionConfig: MPSolutionConfig;
|
|
147
|
-
/**
|
|
148
|
-
* The id of the solution in customer systems.
|
|
149
|
-
*
|
|
150
|
-
* @type {?string}
|
|
151
|
-
*/
|
|
152
|
-
customerId?: string;
|
|
153
|
-
/**
|
|
154
|
-
* The solution's default language.
|
|
155
|
-
*
|
|
156
|
-
* @type {string}
|
|
157
|
-
*/
|
|
158
|
-
defaultLanguage: string;
|
|
159
|
-
/**
|
|
160
|
-
* An array of available languages for the solution.
|
|
161
|
-
*
|
|
162
|
-
* @type {string[]}
|
|
163
|
-
*/
|
|
164
|
-
availableLanguages: string[];
|
|
165
|
-
/**
|
|
166
|
-
* The URL used to fetch data from the CMS.
|
|
167
|
-
*
|
|
168
|
-
* @type {?string}
|
|
169
|
-
*/
|
|
170
|
-
mapClientUrl?: string;
|
|
171
|
-
/**
|
|
172
|
-
* The solution's location template.
|
|
173
|
-
*
|
|
174
|
-
* @type {?string}
|
|
175
|
-
*/
|
|
176
|
-
locationTemplates?: string;
|
|
177
|
-
/**
|
|
178
|
-
* The solution's POI types.
|
|
179
|
-
*
|
|
180
|
-
* @type {?MPPOIType[]}
|
|
181
|
-
*/
|
|
182
|
-
types?: MPPOIType[];
|
|
183
|
-
/**
|
|
184
|
-
* An array of modules that define some behaviors of the SDK set through the CMS.
|
|
185
|
-
*
|
|
186
|
-
* @type {string[]}
|
|
187
|
-
*/
|
|
188
|
-
modules: string[];
|
|
189
|
-
}
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { MPCollisionHandling, MPSettings3D } from "../../index";
|
|
2
|
-
import MPLocationSettings from "./MPLocationSettings";
|
|
3
|
-
import MPUtils from "./MPUtils";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* An object that governs solution level settings such as:
|
|
7
|
-
* * Marker clustering
|
|
8
|
-
* * Marker collision handling
|
|
9
|
-
* * {@link MPSettings3D}
|
|
10
|
-
*
|
|
11
|
-
* @export
|
|
12
|
-
* @class MPSolutionConfig
|
|
13
|
-
* @typedef {MPSolutionConfig}
|
|
14
|
-
*/
|
|
15
|
-
export default class MPSolutionConfig {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Creates an instance of MPSolutionConfig.
|
|
20
|
-
*
|
|
21
|
-
* @constructor
|
|
22
|
-
* @private
|
|
23
|
-
* @param {string} id
|
|
24
|
-
* @param {MPSettings3D} settings3D
|
|
25
|
-
* @param {?boolean} [_enableClustering]
|
|
26
|
-
* @param {?MPCollisionHandling} [_mpCollisionHandling]
|
|
27
|
-
* @param {?boolean} [_isNewSelection]
|
|
28
|
-
* @param {?number} [_automatedZoomLimit]
|
|
29
|
-
*/
|
|
30
|
-
private constructor(
|
|
31
|
-
public readonly id: string,
|
|
32
|
-
public readonly settings3D: MPSettings3D,
|
|
33
|
-
public readonly locationSettings: MPLocationSettings,
|
|
34
|
-
private _enableClustering?: boolean,
|
|
35
|
-
private _mpCollisionHandling?: MPCollisionHandling,
|
|
36
|
-
private _isNewSelection?: boolean,
|
|
37
|
-
private _automatedZoomLimit?: number,
|
|
38
|
-
) { }
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Creator for MPSolutionConfig, used to decode JSON from the MapsIndoors SDK.
|
|
43
|
-
*
|
|
44
|
-
* @public
|
|
45
|
-
* @static
|
|
46
|
-
* @param {MPSolutionConfigParams} object
|
|
47
|
-
* @returns {MPSolutionConfig}
|
|
48
|
-
*/
|
|
49
|
-
public static create(object: MPSolutionConfigParams): MPSolutionConfig {
|
|
50
|
-
return new MPSolutionConfig(
|
|
51
|
-
object?.id,
|
|
52
|
-
MPSettings3D.create(object?.settings3D),
|
|
53
|
-
MPLocationSettings.create("solution", object?.locationSettings),
|
|
54
|
-
object?.enableClustering,
|
|
55
|
-
object?.collisionHandling,
|
|
56
|
-
object?.isNewSelection,
|
|
57
|
-
object?.automatedZoomLimit,
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Set the type of collisionHandling.
|
|
63
|
-
*
|
|
64
|
-
* @public
|
|
65
|
-
* @type {*}
|
|
66
|
-
*/
|
|
67
|
-
public set collisionHandling(collisionHandling: MPCollisionHandling) {
|
|
68
|
-
this._mpCollisionHandling = collisionHandling;
|
|
69
|
-
MPUtils.setCollisionHandling(collisionHandling);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Set the automated zoom limit.
|
|
74
|
-
*
|
|
75
|
-
* @public
|
|
76
|
-
* @type {number}
|
|
77
|
-
*/
|
|
78
|
-
public set automatedZoomLimit(automatedZoomLimit: number) {
|
|
79
|
-
this._automatedZoomLimit = automatedZoomLimit;
|
|
80
|
-
if (automatedZoomLimit == null) {
|
|
81
|
-
MPUtils.setAutomatedZoomLimit(-1);
|
|
82
|
-
}else {
|
|
83
|
-
MPUtils.setAutomatedZoomLimit(automatedZoomLimit);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Get the type of collisionHandling that is set.
|
|
89
|
-
*
|
|
90
|
-
* @public
|
|
91
|
-
* @type {MPCollisionHandling}
|
|
92
|
-
*/
|
|
93
|
-
public get collisionHandling(): MPCollisionHandling {
|
|
94
|
-
return this._mpCollisionHandling ? this._mpCollisionHandling : MPCollisionHandling.allowOverlap;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Set whether clustering is enabled.
|
|
99
|
-
*
|
|
100
|
-
* @public
|
|
101
|
-
* @type {boolean}
|
|
102
|
-
*/
|
|
103
|
-
public set enableClustering(enable: boolean) {
|
|
104
|
-
this._enableClustering = enable;
|
|
105
|
-
MPUtils.setEnableClustering(enable);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Get whether clustering is enabled.
|
|
110
|
-
*
|
|
111
|
-
* @public
|
|
112
|
-
* @type {boolean}
|
|
113
|
-
*/
|
|
114
|
-
public get enableClustering(): boolean {
|
|
115
|
-
return this._enableClustering ? this._enableClustering : true;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
public set isNewSelection(enable: boolean) {
|
|
119
|
-
this._isNewSelection = enable;
|
|
120
|
-
MPUtils.setNewSelection(enable);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
public get isNewSelection(): boolean {
|
|
124
|
-
return this._isNewSelection ? this._isNewSelection : true;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
public get selectable(): boolean | undefined {
|
|
128
|
-
return this.locationSettings.selectable;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
public set selectable(selectable: boolean | undefined) {
|
|
132
|
-
this.locationSettings.selectable = selectable;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Parameter interface for {@link MPSolutionConfig}.
|
|
138
|
-
*
|
|
139
|
-
* @export
|
|
140
|
-
* @interface MPSolutionConfigParams
|
|
141
|
-
* @typedef {MPSolutionConfigParams}
|
|
142
|
-
*/
|
|
143
|
-
export interface MPSolutionConfigParams {
|
|
144
|
-
/**
|
|
145
|
-
* The configuration object's ID.
|
|
146
|
-
*
|
|
147
|
-
* @type {string}
|
|
148
|
-
*/
|
|
149
|
-
id: string,
|
|
150
|
-
/**
|
|
151
|
-
* Settings related to 3D rendering.
|
|
152
|
-
*
|
|
153
|
-
* @type {MPSettings3D}
|
|
154
|
-
*/
|
|
155
|
-
settings3D: MPSettings3D,
|
|
156
|
-
/**
|
|
157
|
-
* Clustering setting.
|
|
158
|
-
*
|
|
159
|
-
* @type {?boolean}
|
|
160
|
-
*/
|
|
161
|
-
enableClustering?: boolean,
|
|
162
|
-
/**
|
|
163
|
-
* Collision setting.
|
|
164
|
-
*
|
|
165
|
-
* @type {?MPCollisionHandling}
|
|
166
|
-
*/
|
|
167
|
-
collisionHandling?: MPCollisionHandling,
|
|
168
|
-
/**
|
|
169
|
-
* New selection setting
|
|
170
|
-
*
|
|
171
|
-
* @type {?boolean}
|
|
172
|
-
*/
|
|
173
|
-
isNewSelection?: boolean,
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Location settings
|
|
177
|
-
*
|
|
178
|
-
* @type {MPLocationSettings}
|
|
179
|
-
*/
|
|
180
|
-
locationSettings: MPLocationSettings,
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Automated zoom limit
|
|
184
|
-
*
|
|
185
|
-
* @type {number}
|
|
186
|
-
*/
|
|
187
|
-
automatedZoomLimit?: number,
|
|
188
|
-
}
|