@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,63 +0,0 @@
|
|
|
1
|
-
import { MPFloor, OnFloorSelectionChangedListener } from "../../index";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Interface used by MapsIndoors to communicate with floor selector UIs.
|
|
5
|
-
*
|
|
6
|
-
* @export
|
|
7
|
-
* @interface MPFloorSelectorInterface
|
|
8
|
-
* @typedef {MPFloorSelectorInterface}
|
|
9
|
-
*/
|
|
10
|
-
export interface MPFloorSelectorInterface {
|
|
11
|
-
/**
|
|
12
|
-
* Update the floors shown in the selector.
|
|
13
|
-
*
|
|
14
|
-
* @param {(Array<MPFloor> | undefined)} floors
|
|
15
|
-
*/
|
|
16
|
-
setFloors(floors: Array<MPFloor> | undefined): void;
|
|
17
|
-
/**
|
|
18
|
-
* NB: This is used internally in the SDK, overwriting the listener will result in functionality loss.
|
|
19
|
-
*
|
|
20
|
-
* Set a listener that listens for when a floor is selected in the floor selector.
|
|
21
|
-
*
|
|
22
|
-
* @param {OnFloorSelectionChangedListener} listener
|
|
23
|
-
*/
|
|
24
|
-
setOnFloorSelectionChangedListener(listener: OnFloorSelectionChangedListener): void;
|
|
25
|
-
/**
|
|
26
|
-
* Show/Hide the floor selector, this is called when a building comes into/out of view.
|
|
27
|
-
*
|
|
28
|
-
* @param {boolean} show
|
|
29
|
-
* @param {boolean} animated
|
|
30
|
-
*/
|
|
31
|
-
show(show: boolean, animated: boolean): void;
|
|
32
|
-
/**
|
|
33
|
-
* Invoked when a floor has been selected programmatically.
|
|
34
|
-
*
|
|
35
|
-
* @param {MPFloor} floor
|
|
36
|
-
*/
|
|
37
|
-
setSelectedFloor(floor: MPFloor): void;
|
|
38
|
-
/**
|
|
39
|
-
* Invoked when a floor has been selected programmatically by index.
|
|
40
|
-
*
|
|
41
|
-
* @param {number} floorIndex
|
|
42
|
-
*/
|
|
43
|
-
setSelectedFloorByFloorIndex(floorIndex: number): void;
|
|
44
|
-
/**
|
|
45
|
-
* Invoked when the zoom level changes.
|
|
46
|
-
*
|
|
47
|
-
* @param {number} newZoomLevel
|
|
48
|
-
*/
|
|
49
|
-
zoomLevelChanged(newZoomLevel: number): void;
|
|
50
|
-
/**
|
|
51
|
-
* Whether to allow the floor to automatically change,
|
|
52
|
-
* eg. when panning to a new building that does not have the current floor.
|
|
53
|
-
*
|
|
54
|
-
* @returns {boolean}
|
|
55
|
-
*/
|
|
56
|
-
isAutoFloorChangeEnabled(): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Invoked when user positioning changes floorIndex.
|
|
59
|
-
*
|
|
60
|
-
* @param {number} floorIndex
|
|
61
|
-
*/
|
|
62
|
-
setUserPositionFloor(floorIndex: number): void;
|
|
63
|
-
}
|
package/src/core/MPGeometry.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import MPPoint from "./MPPoint";
|
|
2
|
-
import MPPolygon from "./MPPolygon";
|
|
3
|
-
import MPMultiPolygon from "./MPMultiPolygon";
|
|
4
|
-
import MPUtils from "./MPUtils";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Superclass of all MapsIndoors geometry classes.
|
|
8
|
-
*
|
|
9
|
-
* @export
|
|
10
|
-
* @abstract
|
|
11
|
-
* @class MPGeometry
|
|
12
|
-
* @typedef {MPGeometry}
|
|
13
|
-
*/
|
|
14
|
-
export default abstract class MPGeometry {
|
|
15
|
-
/**
|
|
16
|
-
* Typename for {@link MPPoint}.
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
* @static
|
|
20
|
-
* @readonly
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
public static readonly point: string = "Point";
|
|
24
|
-
/**
|
|
25
|
-
* Typename for {@link MPPolygon}.
|
|
26
|
-
*
|
|
27
|
-
* @public
|
|
28
|
-
* @static
|
|
29
|
-
* @readonly
|
|
30
|
-
* @type {string}
|
|
31
|
-
*/
|
|
32
|
-
public static readonly polygon: string = "Polygon";
|
|
33
|
-
/**
|
|
34
|
-
* Typename for {@link MPMultiPolygon}.
|
|
35
|
-
*
|
|
36
|
-
* @public
|
|
37
|
-
* @static
|
|
38
|
-
* @readonly
|
|
39
|
-
* @type {string}
|
|
40
|
-
*/
|
|
41
|
-
public static readonly multiPolygon: string = "MultiPolygon";
|
|
42
|
-
/**
|
|
43
|
-
* Position of geometry, used as anchor for markers.
|
|
44
|
-
*
|
|
45
|
-
* @public
|
|
46
|
-
* @abstract
|
|
47
|
-
* @readonly
|
|
48
|
-
* @type {MPPoint}
|
|
49
|
-
*/
|
|
50
|
-
public abstract readonly position: MPPoint;
|
|
51
|
-
/**
|
|
52
|
-
* Type of geometry, see {@link point}.
|
|
53
|
-
*
|
|
54
|
-
* @public
|
|
55
|
-
* @abstract
|
|
56
|
-
* @readonly
|
|
57
|
-
* @type {string}
|
|
58
|
-
*/
|
|
59
|
-
public abstract readonly type: string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Computes the area of the geometry.
|
|
63
|
-
*
|
|
64
|
-
* @public
|
|
65
|
-
* @abstract
|
|
66
|
-
* @returns {Promise<number>}
|
|
67
|
-
*/
|
|
68
|
-
public abstract getArea(): Promise<number>;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Checks whether a point is contained within the geometry.
|
|
72
|
-
*
|
|
73
|
-
* @public
|
|
74
|
-
* @async
|
|
75
|
-
* @param {MPPoint} point
|
|
76
|
-
* @returns {Promise<boolean>}
|
|
77
|
-
*/
|
|
78
|
-
public async contains(point: MPPoint): Promise<boolean> {
|
|
79
|
-
return MPUtils.geometryIsInside(point, this);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Stringifies the geometry to JSON.
|
|
84
|
-
*
|
|
85
|
-
* @public
|
|
86
|
-
* @returns {string}
|
|
87
|
-
*/
|
|
88
|
-
public toJson(): string {
|
|
89
|
-
return JSON.stringify(this);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1,115 +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#setHighlight}.
|
|
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 {MPHighlightBehavior}
|
|
17
|
-
*/
|
|
18
|
-
export default class MPHighlightBehavior {
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Creates an instance of MPHighlightBehavior.
|
|
22
|
-
*
|
|
23
|
-
* @constructor
|
|
24
|
-
* @private
|
|
25
|
-
* @param {boolean} allowFloorChange Whether the highlighting is allowed to change the floor if no results are visible on the current floor.
|
|
26
|
-
* @param {boolean} moveCamera Whether the highlighting should move the camera to encompass the results.
|
|
27
|
-
* @param {number} animationDuration How long the camera movement should be animated for, set to 0 disables animation.
|
|
28
|
-
* @param {boolean} showInfoWindow Whether to open the info window if a single result is returned.
|
|
29
|
-
* @param {boolean} zoomToFit Whether the highlighting is allowed to zoom in/out the camera.
|
|
30
|
-
* @param {number} maxZoom The maximum zoom level to zoom to when zoomToFit is enabled.
|
|
31
|
-
*/
|
|
32
|
-
private constructor(
|
|
33
|
-
public allowFloorChange: boolean,
|
|
34
|
-
public moveCamera: boolean,
|
|
35
|
-
public animationDuration: number,
|
|
36
|
-
public showInfoWindow: boolean,
|
|
37
|
-
public zoomToFit: boolean,
|
|
38
|
-
public maxZoom?: number
|
|
39
|
-
) { }
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Creator for MPHighlightBehavior, invoke with 0 parameters to use default behavior.
|
|
43
|
-
*
|
|
44
|
-
* @public
|
|
45
|
-
* @static
|
|
46
|
-
* @param {MPFilterBehaviorParams} object
|
|
47
|
-
* @returns {MPFilterBehavior}
|
|
48
|
-
*/
|
|
49
|
-
public static create(object?: MPHighlightBehaviorParams): MPHighlightBehavior {
|
|
50
|
-
if(Platform.OS === 'ios') {
|
|
51
|
-
return new MPHighlightBehavior(
|
|
52
|
-
object?.allowFloorChange ?? false,
|
|
53
|
-
object?.moveCamera ?? false,
|
|
54
|
-
object?.animationDuration ?? 0,
|
|
55
|
-
object?.showInfoWindow ?? false,
|
|
56
|
-
object?.zoomToFit ?? true,
|
|
57
|
-
object?.maxZoom ?? 999
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
return new MPHighlightBehavior(
|
|
61
|
-
object?.allowFloorChange ?? false,
|
|
62
|
-
object?.moveCamera ?? false,
|
|
63
|
-
object?.animationDuration ?? 0,
|
|
64
|
-
object?.showInfoWindow ?? false,
|
|
65
|
-
object?.zoomToFit ?? true,
|
|
66
|
-
object?.maxZoom
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Parameter interface for {@link MPHighlightBehavior}.
|
|
73
|
-
*
|
|
74
|
-
* @export
|
|
75
|
-
* @interface MPHighlightBehaviorParams
|
|
76
|
-
* @typedef {MPHighlightBehaviorParams}
|
|
77
|
-
*/
|
|
78
|
-
export interface MPHighlightBehaviorParams {
|
|
79
|
-
/**
|
|
80
|
-
* Whether the highlight is allowed to change the floor if no results are visible on the current floor.
|
|
81
|
-
*
|
|
82
|
-
* @type {?boolean}
|
|
83
|
-
*/
|
|
84
|
-
allowFloorChange?: boolean,
|
|
85
|
-
/**
|
|
86
|
-
* Whether the Highlight should move the camera to encompass the results.
|
|
87
|
-
*
|
|
88
|
-
* @type {?boolean}
|
|
89
|
-
*/
|
|
90
|
-
moveCamera?: boolean,
|
|
91
|
-
/**
|
|
92
|
-
* How long the camera movement should be animated for, set to 0 disables animation.
|
|
93
|
-
*
|
|
94
|
-
* @type {?number}
|
|
95
|
-
*/
|
|
96
|
-
animationDuration?: number,
|
|
97
|
-
/**
|
|
98
|
-
* Whether to open the info window if a single result is returned.
|
|
99
|
-
*
|
|
100
|
-
* @type {?boolean}
|
|
101
|
-
*/
|
|
102
|
-
showInfoWindow?: boolean,
|
|
103
|
-
/**
|
|
104
|
-
* Whether the Highlight is allowed to zoom in/out the camera.
|
|
105
|
-
*
|
|
106
|
-
* @type {?boolean}
|
|
107
|
-
*/
|
|
108
|
-
zoomToFit?: boolean,
|
|
109
|
-
/**
|
|
110
|
-
* The maximum zoom level to zoom to when zoomToFit is enabled.
|
|
111
|
-
*
|
|
112
|
-
* @type {?number}
|
|
113
|
-
*/
|
|
114
|
-
maxZoom?: number
|
|
115
|
-
}
|
package/src/core/MPHighway.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export enum MPHighway {
|
|
2
|
-
unclassified = "unclassified",
|
|
3
|
-
footway = "footway",
|
|
4
|
-
residential = "residential",
|
|
5
|
-
service = "service",
|
|
6
|
-
ramp = "ramp",
|
|
7
|
-
steps = "steps",
|
|
8
|
-
escalator = "escalator",
|
|
9
|
-
travelator = "travelator",
|
|
10
|
-
elevator = "elevator",
|
|
11
|
-
wheelChairRamp = "wheelchairramp",
|
|
12
|
-
wheelChairLift = "wheelchairlift",
|
|
13
|
-
ladder = "ladder",
|
|
14
|
-
}
|
package/src/core/MPIconSize.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import MPSize from "./MPSize";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Class to hold height and width information for an icon.
|
|
5
|
-
*
|
|
6
|
-
* @export
|
|
7
|
-
* @class MPIconSize
|
|
8
|
-
* @typedef {MPIconSize}
|
|
9
|
-
* @implements {MPSize}
|
|
10
|
-
*/
|
|
11
|
-
export default class MPIconSize implements MPSize {
|
|
12
|
-
/**
|
|
13
|
-
* Creates an instance of MPIconSize.
|
|
14
|
-
*
|
|
15
|
-
* @constructor
|
|
16
|
-
* @private
|
|
17
|
-
* @param {number} height The height measure.
|
|
18
|
-
* @param {number} width The width measure.
|
|
19
|
-
*/
|
|
20
|
-
private constructor(
|
|
21
|
-
public readonly height: number,
|
|
22
|
-
public readonly width: number
|
|
23
|
-
) { }
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Creator for MPIconSize, used to decode JSON from the MapsIndoors SDK.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
* @static
|
|
30
|
-
* @param {MPSize} object
|
|
31
|
-
* @returns {MPIconSize}
|
|
32
|
-
*/
|
|
33
|
-
public static create(object: MPSize): MPIconSize {
|
|
34
|
-
return new MPIconSize(
|
|
35
|
-
object?.height,
|
|
36
|
-
object?.width,
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export default class MPLabelGraphic {
|
|
2
|
-
private constructor(
|
|
3
|
-
public readonly backgroundImage: string,
|
|
4
|
-
public readonly stretchX: number[][],
|
|
5
|
-
public readonly stretchY: number[][],
|
|
6
|
-
public readonly content: number[]
|
|
7
|
-
) { }
|
|
8
|
-
|
|
9
|
-
public static create(object: MPLabelGraphicParams): MPLabelGraphic {
|
|
10
|
-
return new MPLabelGraphic(
|
|
11
|
-
object.backgroundImage,
|
|
12
|
-
object.stretchX,
|
|
13
|
-
object.stretchY,
|
|
14
|
-
object.content,
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface MPLabelGraphicParams {
|
|
20
|
-
backgroundImage: string;
|
|
21
|
-
stretchX: number[][];
|
|
22
|
-
stretchY: number[][];
|
|
23
|
-
content: number[];
|
|
24
|
-
}
|