@jadamsbit/react-native-mapbox-navigation 1.0.3 → 1.0.4
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/dist/typings.d.ts
CHANGED
|
@@ -14,7 +14,5 @@ RCT_EXPORT_VIEW_PROPERTY(showsEndOfRouteFeedback, BOOL)
|
|
|
14
14
|
RCT_EXPORT_VIEW_PROPERTY(hideStatusView, BOOL)
|
|
15
15
|
RCT_EXPORT_VIEW_PROPERTY(mute, BOOL)
|
|
16
16
|
RCT_EXPORT_VIEW_PROPERTY(waypoints, NSArray<NSArray>)
|
|
17
|
-
RCT_EXPORT_VIEW_PROPERTY(vehicleMaxHeight, NSNumber)
|
|
18
|
-
RCT_EXPORT_VIEW_PROPERTY(vehicleMaxWidth, NSNumber)
|
|
19
17
|
|
|
20
18
|
@end
|
|
@@ -43,8 +43,6 @@ class MapboxNavigationView: UIView, NavigationViewControllerDelegate {
|
|
|
43
43
|
@objc var onError: RCTDirectEventBlock?
|
|
44
44
|
@objc var onCancelNavigation: RCTDirectEventBlock?
|
|
45
45
|
@objc var onArrive: RCTDirectEventBlock?
|
|
46
|
-
@objc var vehicleMaxHeight: NSNumber?
|
|
47
|
-
@objc var vehicleMaxWidth: NSNumber?
|
|
48
46
|
|
|
49
47
|
override init(frame: CGRect) {
|
|
50
48
|
self.embedded = false
|
|
@@ -96,14 +94,6 @@ class MapboxNavigationView: UIView, NavigationViewControllerDelegate {
|
|
|
96
94
|
// let options = NavigationRouteOptions(waypoints: [originWaypoint, destinationWaypoint])
|
|
97
95
|
let options = NavigationRouteOptions(waypoints: [originWaypoint, destinationWaypoint], profileIdentifier: .automobileAvoidingTraffic)
|
|
98
96
|
|
|
99
|
-
if let vehicleMaxHeight = vehicleMaxHeight?.doubleValue {
|
|
100
|
-
options.includesMaxHeightOnMostRestrictiveBridge = true
|
|
101
|
-
options.maxHeight = vehicleMaxHeight
|
|
102
|
-
}
|
|
103
|
-
if let vehicleMaxWidth = vehicleMaxWidth?.doubleValue {
|
|
104
|
-
options.maxWidth = vehicleMaxWidth
|
|
105
|
-
}
|
|
106
|
-
|
|
107
97
|
Directions.shared.calculate(options) { [weak self] (_, result) in
|
|
108
98
|
guard let strongSelf = self, let parentVC = strongSelf.parentViewController else {
|
|
109
99
|
return
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jadamsbit/react-native-mapbox-navigation",
|
|
3
3
|
"title": "React Native Mapbox Navigation",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"description": "Smart Mapbox turn-by-turn routing based on real-time traffic for React Native.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|