@mapsindoors/react-native-maps-indoors-mapbox 0.0.5-beta → 1.0.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/README.md +10 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/reactlibrary/MapboxMapView.java +112 -0
- package/android/src/main/java/com/reactlibrary/MapsIndoorsPackage.java +7 -2
- package/android/src/main/java/com/reactlibrary/{DirectionsRendererModule.java → core/DirectionsRendererModule.java} +3 -2
- package/android/src/main/java/com/reactlibrary/{DirectionsServiceModule.java → core/DirectionsServiceModule.java} +1 -1
- package/android/src/main/java/com/reactlibrary/{MPDisplayRuleModule.java → core/MPDisplayRuleModule.java} +2 -2
- package/android/src/main/java/com/reactlibrary/{MapControlModule.java → core/MapControlModule.java} +16 -57
- package/android/src/main/java/com/reactlibrary/{MapsIndoorsModule.java → core/MapsIndoorsModule.java} +6 -6
- package/android/src/main/java/com/reactlibrary/core/RCMapView.java +16 -0
- package/android/src/main/java/com/reactlibrary/core/README.md +3 -0
- package/android/src/main/java/com/reactlibrary/{UtilsModule.java → core/UtilsModule.java} +2 -2
- package/android/src/main/java/com/reactlibrary/{models → core/models}/Bounds.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/Filter.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/Location.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/MPCameraPosition.java +12 -7
- package/android/src/main/java/com/reactlibrary/core/models/MPCameraUpdate.java +68 -0
- package/android/src/main/java/com/reactlibrary/{models → core/models}/MPError.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/PositionProvider.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/PositionResult.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/Query.java +1 -1
- package/index.ts +88 -89
- package/ios/MapsIndoorsViewManager.swift +88 -9
- package/ios/core/CameraPosition.swift +15 -0
- package/ios/core/CameraUpdate.swift +19 -0
- package/ios/core/CameraUpdateError.swift +11 -0
- package/ios/{DirectionsRendererBridge.m → core/DirectionsRendererBridge.m} +1 -1
- package/ios/{DirectionsRendererModule.swift → core/DirectionsRendererModule.swift} +17 -7
- package/ios/{MapControlModule.swift → core/MapControlModule.swift} +10 -100
- package/ios/{MapsIndoorsBridge.m → core/MapsIndoorsBridge.m} +18 -0
- package/ios/{MapsIndoorsData.swift → core/MapsIndoorsData.swift} +2 -2
- package/ios/{MapsIndoorsModule.swift → core/MapsIndoorsModule.swift} +50 -1
- package/ios/core/RCMapView.swift +14 -0
- package/ios/core/README.md +4 -0
- package/ios/{UtilsModule.swift → core/UtilsModule.swift} +4 -4
- package/package.json +6 -5
- package/react-native-maps-indoors-mapbox.podspec +2 -2
- package/src/{MPBounds.ts → core/MPBounds.ts} +12 -4
- package/src/{MPBuilding.ts → core/MPBuilding.ts} +1 -1
- package/src/{MPCameraEvent.ts → core/MPCameraEvent.ts} +1 -1
- package/src/{MPCameraEventListener.ts → core/MPCameraEventListener.ts} +1 -1
- package/src/{MPCameraPosition.ts → core/MPCameraPosition.ts} +0 -1
- package/src/{MPCategory.ts → core/MPCategory.ts} +1 -1
- package/src/{MPDirectionsRenderer.ts → core/MPDirectionsRenderer.ts} +4 -4
- package/src/{MPDirectionsService.ts → core/MPDirectionsService.ts} +1 -1
- package/src/{MPDisplayRule.ts → core/MPDisplayRule.ts} +1 -1
- package/src/{MPEntity.ts → core/MPEntity.ts} +1 -1
- package/src/{MPEntityInfo.ts → core/MPEntityInfo.ts} +1 -1
- package/src/{MPFilter.ts → core/MPFilter.ts} +1 -1
- package/src/{MPFilterBehavior.ts → core/MPFilterBehavior.ts} +1 -1
- package/src/{MPFloor.ts → core/MPFloor.ts} +1 -1
- package/src/{MPFloorSelectorInterface.ts → core/MPFloorSelectorInterface.ts} +1 -1
- package/src/{MPLocation.ts → core/MPLocation.ts} +1 -1
- package/src/{MPMapConfig.ts → core/MPMapConfig.ts} +1 -1
- package/src/{MPMultiPolygon.ts → core/MPMultiPolygon.ts} +1 -1
- package/src/{MPPoint.ts → core/MPPoint.ts} +5 -6
- package/src/{MPPolygon.ts → core/MPPolygon.ts} +1 -1
- package/src/{MPPositionProviderInterface.ts → core/MPPositionProviderInterface.ts} +1 -1
- package/src/{MPPositionResultInterface.ts → core/MPPositionResultInterface.ts} +1 -1
- package/src/{MPPropertyData.ts → core/MPPropertyData.ts} +1 -1
- package/src/{MPQuery.ts → core/MPQuery.ts} +1 -1
- package/src/{MPRoute.ts → core/MPRoute.ts} +1 -1
- package/src/{MPRouteCoordinate.ts → core/MPRouteCoordinate.ts} +1 -1
- package/src/{MPRouteLeg.ts → core/MPRouteLeg.ts} +1 -1
- package/src/{MPRouteStep.ts → core/MPRouteStep.ts} +1 -1
- package/src/{MPSelectionBehavior.ts → core/MPSelectionBehavior.ts} +1 -1
- package/src/{MPSettings3D.ts → core/MPSettings3D.ts} +1 -1
- package/src/{MPSolution.ts → core/MPSolution.ts} +1 -1
- package/src/{MPSolutionConfig.ts → core/MPSolutionConfig.ts} +1 -1
- package/src/{MPSolutionDisplayRule.ts → core/MPSolutionDisplayRule.ts} +1 -1
- package/src/{MPUserRoleCollection.ts → core/MPUserRoleCollection.ts} +1 -1
- package/src/{MPUtils.ts → core/MPUtils.ts} +1 -1
- package/src/{MPVenue.ts → core/MPVenue.ts} +1 -1
- package/src/{MapControl.ts → core/MapControl.ts} +1 -1
- package/src/{MapsIndoors.ts → core/MapsIndoors.ts} +1 -1
- package/src/{OnBuildingFoundAtCameraTargetListener.ts → core/OnBuildingFoundAtCameraTargetListener.ts} +1 -1
- package/src/{OnFloorSelectionChangedListener.ts → core/OnFloorSelectionChangedListener.ts} +1 -1
- package/src/{OnLegSelectedListener.ts → core/OnLegSelectedListener.ts} +1 -1
- package/src/{OnLocationSelectedListener.ts → core/OnLocationSelectedListener.ts} +1 -1
- package/src/{OnMapClickListener.ts → core/OnMapClickListener.ts} +1 -1
- package/src/{OnMarkerClickListener.ts → core/OnMarkerClickListener.ts} +1 -1
- package/src/{OnMarkerInfoWindowClickListener.ts → core/OnMarkerInfoWindowClickListener.ts} +1 -1
- package/src/{OnPositionUpdateListener.ts → core/OnPositionUpdateListener.ts} +1 -1
- package/src/{OnVenueFoundAtCameraTargetListener.ts → core/OnVenueFoundAtCameraTargetListener.ts} +1 -1
- package/src/core/README.md +4 -0
- package/android/src/main/java/com/reactlibrary/models/MPCameraUpdate.java +0 -92
- /package/ios/{DirectionsServiceBridge.m → core/DirectionsServiceBridge.m} +0 -0
- /package/ios/{DirectionsServiceModule.swift → core/DirectionsServiceModule.swift} +0 -0
- /package/ios/{MPDisplayRuleBridge.m → core/MPDisplayRuleBridge.m} +0 -0
- /package/ios/{MPDisplayRuleModule.swift → core/MPDisplayRuleModule.swift} +0 -0
- /package/ios/{MapControlBridge.m → core/MapControlBridge.m} +0 -0
- /package/ios/{ReactPositionProvider.swift → core/ReactPositionProvider.swift} +0 -0
- /package/ios/{UtilsBridge.m → core/UtilsBridge.m} +0 -0
- /package/ios/{helpers.swift → core/helpers.swift} +0 -0
- /package/src/{EventNames.ts → core/EventNames.ts} +0 -0
- /package/src/{MPBuildingCollection.ts → core/MPBuildingCollection.ts} +0 -0
- /package/src/{MPBuildingInfo.ts → core/MPBuildingInfo.ts} +0 -0
- /package/src/{MPCameraUpdate.ts → core/MPCameraUpdate.ts} +0 -0
- /package/src/{MPCameraViewFitMode.ts → core/MPCameraViewFitMode.ts} +0 -0
- /package/src/{MPCategoryCollection.ts → core/MPCategoryCollection.ts} +0 -0
- /package/src/{MPCollection.ts → core/MPCollection.ts} +0 -0
- /package/src/{MPCollisionHandling.ts → core/MPCollisionHandling.ts} +0 -0
- /package/src/{MPDataField.ts → core/MPDataField.ts} +0 -0
- /package/src/{MPError.ts → core/MPError.ts} +0 -0
- /package/src/{MPGeometry.ts → core/MPGeometry.ts} +0 -0
- /package/src/{MPHighway.ts → core/MPHighway.ts} +0 -0
- /package/src/{MPIconSize.ts → core/MPIconSize.ts} +0 -0
- /package/src/{MPLocationPropertyNames.ts → core/MPLocationPropertyNames.ts} +0 -0
- /package/src/{MPLocationType.ts → core/MPLocationType.ts} +0 -0
- /package/src/{MPMapStyle.ts → core/MPMapStyle.ts} +0 -0
- /package/src/{MPRouteProperty.ts → core/MPRouteProperty.ts} +0 -0
- /package/src/{MPSize.ts → core/MPSize.ts} +0 -0
- /package/src/{MPUserRole.ts → core/MPUserRole.ts} +0 -0
- /package/src/{MPVenueCollection.ts → core/MPVenueCollection.ts} +0 -0
- /package/src/{MPVenueInfo.ts → core/MPVenueInfo.ts} +0 -0
- /package/src/{MapView.tsx → core/MapView.tsx} +0 -0
- /package/src/{OnFloorUpdateListener.ts → core/OnFloorUpdateListener.ts} +0 -0
- /package/src/{OnLiveLocationUpdateListener.ts → core/OnLiveLocationUpdateListener.ts} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import MapsIndoors
|
|
2
2
|
import MapsIndoorsCore
|
|
3
3
|
import MapsIndoorsCodable
|
|
4
|
-
import MapboxMaps
|
|
5
4
|
import React
|
|
6
5
|
|
|
7
6
|
protocol LiveDataDelegate {
|
|
@@ -11,8 +10,9 @@ protocol LiveDataDelegate {
|
|
|
11
10
|
class MapsIndoorsData {
|
|
12
11
|
public static var sharedInstance = MapsIndoorsData()
|
|
13
12
|
|
|
14
|
-
public var mapView:
|
|
13
|
+
public var mapView: RCMapView?
|
|
15
14
|
public var mapControl: MPMapControl?
|
|
15
|
+
public var isInitialized: Bool = false
|
|
16
16
|
|
|
17
17
|
var mapControlListenerDelegate: MapControlDelegate?
|
|
18
18
|
var floorSelector: FloorSelector?
|
|
@@ -23,6 +23,7 @@ public class MapsIndoorsModule: NSObject {
|
|
|
23
23
|
Task {
|
|
24
24
|
do {
|
|
25
25
|
try await MPMapsIndoors.shared.load(apiKey: apiKey)
|
|
26
|
+
MapsIndoorsData.sharedInstance.isInitialized = true
|
|
26
27
|
return resolve([])
|
|
27
28
|
} catch let e /*as MPError*/ {
|
|
28
29
|
return doReject(reject, error: e)
|
|
@@ -181,7 +182,6 @@ public class MapsIndoorsModule: NSObject {
|
|
|
181
182
|
|
|
182
183
|
positionProvider = provider
|
|
183
184
|
MapsIndoorsData.sharedInstance.mapControl?.positionProvider = positionProvider
|
|
184
|
-
// TODO: Do we need to store a reference both places?
|
|
185
185
|
|
|
186
186
|
return resolve(nil)
|
|
187
187
|
}
|
|
@@ -243,5 +243,54 @@ public class MapsIndoorsModule: NSObject {
|
|
|
243
243
|
|
|
244
244
|
return resolve(MPMapsIndoors.shared.ready)
|
|
245
245
|
}
|
|
246
|
+
|
|
247
|
+
@objc public func getDefaultVenue(_ resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
248
|
+
Task {
|
|
249
|
+
guard let defaultVenue = await MPMapsIndoors.shared.venues().first else {
|
|
250
|
+
return reject("1", "no venues exist. Make sure MapsIndoors is ready", nil)
|
|
251
|
+
}
|
|
252
|
+
return resolve(toJSON(MPVenueCodable(withVenue: defaultVenue)))
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@objc public func checkOfflineDataAvailability(_ resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
257
|
+
Task {
|
|
258
|
+
guard let key = MPMapsIndoors.shared.apiKey else {
|
|
259
|
+
return reject("1", "isApiKeyValid: API key not set", nil)
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
return resolve(await MPMapsIndoors.shared.isOfflineDataAvailable(apiKey: key))
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
@objc public func destroy(_ resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
267
|
+
Task {
|
|
268
|
+
MPMapsIndoors.shared.shutdown()
|
|
269
|
+
MapsIndoorsData.sharedInstance.isInitialized = false
|
|
270
|
+
return resolve(nil)
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
@objc public func isInitialized(_ resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
275
|
+
return resolve(MapsIndoorsData.sharedInstance.isInitialized)
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@objc public func setLanguage(_ language: String, resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) {
|
|
279
|
+
|
|
280
|
+
MPMapsIndoors.shared.language = language
|
|
281
|
+
return resolve(nil)
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@objc public func synchronizeContent(_ resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
285
|
+
Task {
|
|
286
|
+
do {
|
|
287
|
+
try await MPMapsIndoors.shared.synchronize()
|
|
288
|
+
return resolve(nil)
|
|
289
|
+
}
|
|
290
|
+
catch let e {
|
|
291
|
+
return doReject(reject, error: e)
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
246
295
|
|
|
247
296
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RCMapView.swift
|
|
3
|
+
// react-native-maps-indoors-mapbox
|
|
4
|
+
//
|
|
5
|
+
// Created by Tim Mikkelsen on 14/06/2023.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import MapsIndoors
|
|
9
|
+
|
|
10
|
+
protocol RCMapView {
|
|
11
|
+
func animateCamera(cameraUpdate: CameraUpdate, duration: Int) throws
|
|
12
|
+
func moveCamera(cameraUpdate: CameraUpdate) throws
|
|
13
|
+
func getConfig() -> MPMapConfig
|
|
14
|
+
}
|
|
@@ -134,13 +134,13 @@ public class UtilsModule: NSObject {
|
|
|
134
134
|
return resolve(nil)
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
@objc public func setExtrusionOpacity(_
|
|
138
|
-
|
|
137
|
+
@objc public func setExtrusionOpacity(_ opacity: Double, resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) {
|
|
138
|
+
MPMapsIndoors.shared.solution?.config.settings3D.extrusionOpacity = opacity
|
|
139
139
|
return resolve(nil)
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
@objc public func setWallOpacity(_
|
|
143
|
-
|
|
142
|
+
@objc public func setWallOpacity(_ opacity: Double, resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) {
|
|
143
|
+
MPMapsIndoors.shared.solution?.config.settings3D.wallOpacity = opacity
|
|
144
144
|
return resolve(nil)
|
|
145
145
|
}
|
|
146
146
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapsindoors/react-native-maps-indoors-mapbox",
|
|
3
3
|
"title": "React Native MapsIndoors Mapbox",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"description": "React Native MapsIndoors component with mapbox",
|
|
6
6
|
"react-native": "index.ts",
|
|
7
7
|
"files": [
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/
|
|
22
|
-
"baseUrl": "https://github.com/
|
|
21
|
+
"url": "git+https://github.com/MapsPeople/react-native-mapsindoors-mapbox.git",
|
|
22
|
+
"baseUrl": "https://github.com/MapsPeople/react-native-mapsindoors-mapbox"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"react-native",
|
|
@@ -41,12 +41,13 @@
|
|
|
41
41
|
"@tsconfig/react-native": "^3.0.2",
|
|
42
42
|
"@types/jest": "^29.5.2",
|
|
43
43
|
"@types/react": "^18.2.9",
|
|
44
|
-
"@types/react-native": "^0.72.2",
|
|
45
44
|
"@types/react-dom": "18.2.0",
|
|
45
|
+
"@types/react-native": "^0.72.2",
|
|
46
46
|
"@types/react-test-renderer": "^18.0.0",
|
|
47
|
+
"typedoc": "^0.24.8",
|
|
47
48
|
"typescript": "^5.0.4"
|
|
48
49
|
},
|
|
49
50
|
"bugs": {
|
|
50
|
-
"url": "https://github.com/
|
|
51
|
+
"url": "https://github.com/MapsPeople/react-native-mapsindoors-mapbox/issues"
|
|
51
52
|
}
|
|
52
53
|
}
|
|
@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
|
|
|
24
24
|
s.requires_arc = true
|
|
25
25
|
|
|
26
26
|
s.dependency "React"
|
|
27
|
-
s.dependency "MapsIndoorsMapbox", "4.1
|
|
28
|
-
s.dependency "MapsIndoorsCodable", "4.1
|
|
27
|
+
s.dependency "MapsIndoorsMapbox", "4.2.1"
|
|
28
|
+
s.dependency "MapsIndoorsCodable", "4.2.1"
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -32,10 +32,18 @@ export default class MPBounds {
|
|
|
32
32
|
* @returns {MPBounds}
|
|
33
33
|
*/
|
|
34
34
|
public static create(object: MPBoundsParams): MPBounds {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
object.
|
|
38
|
-
|
|
35
|
+
var bounds;
|
|
36
|
+
if ((object as any).northeast.lat != null) {
|
|
37
|
+
var northeast = new MPPoint((object as any).northeast.lat, (object as any).northeast.lng, (object as any).northeast.zLevel);
|
|
38
|
+
var southwest = new MPPoint((object as any).southwest.lat, (object as any).southwest.lng, (object as any).southwest.zLevel);
|
|
39
|
+
bounds = new MPBounds(northeast, southwest)
|
|
40
|
+
}else {
|
|
41
|
+
bounds = new MPBounds(
|
|
42
|
+
object.northeast,
|
|
43
|
+
object.southwest,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
return bounds
|
|
39
47
|
}
|
|
40
48
|
|
|
41
49
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import MPEntity from "./MPEntity";
|
|
2
|
-
import { MPPoint, MPPolygon, MPFloor, MPBounds, MPDataField, MPPointParams, MPFloorParams } from "
|
|
2
|
+
import { MPPoint, MPPolygon, MPFloor, MPBounds, MPDataField, MPPointParams, MPFloorParams } from "../../index";
|
|
3
3
|
import MPBuildingInfo, { MPBuildingInfoParams } from "./MPBuildingInfo";
|
|
4
4
|
import { Platform } from "react-native";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmitterSubscription, NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
|
-
import { MPCameraViewFitMode, MPError, MPRoute, OnLegSelectedListener } from "
|
|
2
|
+
import { MPCameraViewFitMode, MPError, MPRoute, OnLegSelectedListener } from "../../index";
|
|
3
3
|
import { EventNames } from './EventNames';
|
|
4
4
|
|
|
5
5
|
const { DirectionsRenderer } = NativeModules;
|
|
@@ -83,7 +83,7 @@ export default class MPDirectionsRenderer {
|
|
|
83
83
|
* @param {?MPRoute} [route]
|
|
84
84
|
* @returns {Promise<void>}
|
|
85
85
|
*/
|
|
86
|
-
public async setRoute(route
|
|
86
|
+
public async setRoute(route: MPRoute): Promise<void> {
|
|
87
87
|
await DirectionsRenderer.setRoute(JSON.stringify(route))
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -111,8 +111,8 @@ export default class MPDirectionsRenderer {
|
|
|
111
111
|
* @param {number} legIndex
|
|
112
112
|
* @returns {Promise<void>}
|
|
113
113
|
*/
|
|
114
|
-
public async
|
|
115
|
-
await DirectionsRenderer.
|
|
114
|
+
public async selectLegIndex(legIndex: number): Promise<void> {
|
|
115
|
+
await DirectionsRenderer.selectLegIndex(legIndex).catch((err: Error) => {
|
|
116
116
|
return Promise.reject(MPError.create(JSON.parse(err.message)));
|
|
117
117
|
});
|
|
118
118
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import MPEntity from "./MPEntity";
|
|
2
|
-
import { MPMultiPolygon, MPMultiPolygonParams, MPBounds, MPPoint, MPBuilding } from "
|
|
2
|
+
import { MPMultiPolygon, MPMultiPolygonParams, MPBounds, MPPoint, MPBuilding } from "../../index";
|
|
3
3
|
import { Platform } from "react-native";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Platform } from "react-native";
|
|
2
|
-
import { MPGeometry, MPPoint, MPPolygon, MPBuilding, MPVenue, MPMultiPolygon, MPBounds, MPLocationType, MPLocationPropertyNames } from "
|
|
2
|
+
import { MPGeometry, MPPoint, MPPolygon, MPBuilding, MPVenue, MPMultiPolygon, MPBounds, MPLocationType, MPLocationPropertyNames } from "../../index";
|
|
3
3
|
import MPEntity from "./MPEntity";
|
|
4
4
|
import MPPropertyData from "./MPPropertyData";
|
|
5
5
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import MPGeometry from "./MPGeometry";
|
|
2
2
|
import MPUtils from "./MPUtils";
|
|
3
3
|
|
|
4
|
-
var firstTimeWarned = false
|
|
5
|
-
|
|
6
4
|
/**
|
|
7
5
|
* MPPoint is a representation of {@link latitude} and {@link longitude} coordinates packaged with
|
|
8
6
|
* a Z-axis representation in {@link floorIndex}.
|
|
@@ -32,7 +30,7 @@ export default class MPPoint extends MPGeometry {
|
|
|
32
30
|
public readonly longitude: number;
|
|
33
31
|
/**
|
|
34
32
|
* Optional index that defines what floor this point is placed on.
|
|
35
|
-
*
|
|
33
|
+
*
|
|
36
34
|
* If 0 it is placed on the ground floor, or outside.
|
|
37
35
|
*
|
|
38
36
|
* @public
|
|
@@ -69,7 +67,8 @@ export default class MPPoint extends MPGeometry {
|
|
|
69
67
|
if (pointParams?.coordinates) {
|
|
70
68
|
return new MPPoint(pointParams.coordinates[1], pointParams.coordinates[0], pointParams.coordinates[2]);
|
|
71
69
|
} else if (pointParams as unknown as number[]){
|
|
72
|
-
|
|
70
|
+
const pp = pointParams as unknown as number[]
|
|
71
|
+
return new MPPoint(pp[1], pp[0], pp[2]);
|
|
73
72
|
}else {
|
|
74
73
|
return null;
|
|
75
74
|
}
|
|
@@ -156,10 +155,10 @@ export default class MPPoint extends MPGeometry {
|
|
|
156
155
|
export interface MPPointParams {
|
|
157
156
|
/**
|
|
158
157
|
* Coordinate holder for point, on the form:.
|
|
159
|
-
*
|
|
158
|
+
*
|
|
160
159
|
* [LNG, LAT, FLOOR]
|
|
161
160
|
*
|
|
162
161
|
* @type {number[]}
|
|
163
162
|
*/
|
|
164
163
|
coordinates: number[],
|
|
165
|
-
}
|
|
164
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MPRouteStep, MPRouteProperty, MPRoutePropertyParams, MPRouteCoordinate, MPRouteCoordinateParams, MPRoute } from "
|
|
1
|
+
import { MPRouteStep, MPRouteProperty, MPRoutePropertyParams, MPRouteCoordinate, MPRouteCoordinateParams, MPRoute } from "../../index";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A leg of a {@link MPRoute} is defined as all steps between any context shifts (entering/exiting buildings, changing floors).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Platform } from "react-native";
|
|
2
|
-
import { MPPoint, MPPointParams, MPBounds, MPMapStyle, MPPolygon, MPVenueInfo, MPDataField, MPBuilding, MPLocation } from '
|
|
2
|
+
import { MPPoint, MPPointParams, MPBounds, MPMapStyle, MPPolygon, MPVenueInfo, MPDataField, MPBuilding, MPLocation } from '../../index';
|
|
3
3
|
import MPEntity from "./MPEntity";
|
|
4
4
|
import MPUtils from "./MPUtils";
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
OnVenueFoundAtCameraTargetListener, OnBuildingFoundAtCameraTargetListener,
|
|
8
8
|
OnMarkerClickListener, OnMarkerInfoWindowClickListener,
|
|
9
9
|
OnLiveLocationUpdateListener, MPCameraEvent, MPMapStyle, MPCameraUpdate, MPCameraPosition, MPEntity,
|
|
10
|
-
} from "
|
|
10
|
+
} from "../../index"
|
|
11
11
|
import { EventNames } from './EventNames';
|
|
12
12
|
|
|
13
13
|
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
MPLocation, MPSolution, MPVenue, MPQuery, MPFilter,
|
|
5
5
|
MPDisplayRule, MPSolutionDisplayRule, MPPositionProviderInterface,
|
|
6
6
|
MPPositionResultInterface, MPUserRole, MPError, MPCategoryCollection, MPUserRoleCollection
|
|
7
|
-
} from "
|
|
7
|
+
} from "../../index";
|
|
8
8
|
import MPBuildingCollection from './MPBuildingCollection';
|
|
9
9
|
import MPVenueCollection from './MPVenueCollection';
|
|
10
10
|
|