@mapsindoors/react-native-maps-indoors-mapbox 2.1.0 → 2.1.2
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 +1 -2
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/mapsindoorsrn/MapboxMapView.java +5 -1
- package/app.plugin.js +0 -1
- package/ios/MapsIndoorsViewManager.swift +2 -2
- package/ios/core/MapControlModule.swift +12 -10
- package/package.json +1 -1
- package/react-native-maps-indoors-mapbox.podspec +2 -2
- package/src/core/MPHighlightBehavior.ts +5 -5
- package/src/core/MPSelectionBehavior.ts +5 -5
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Documentation
|
|
4
4
|
|
|
5
|
-
Visit [our reference document site](https://app.mapsindoors.com/mapsindoors/reference/react-native/mapbox/2.1.
|
|
5
|
+
Visit [our reference document site](https://app.mapsindoors.com/mapsindoors/reference/react-native/mapbox/2.1.2/index.html) to get an overview of what the MapsIndoors SDK offers.
|
|
6
6
|
|
|
7
7
|
## Getting started
|
|
8
8
|
|
|
@@ -26,7 +26,6 @@ target 'MyApp' do
|
|
|
26
26
|
installer.pods_project.targets.each do |target|
|
|
27
27
|
target.build_configurations.each do |config|
|
|
28
28
|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
|
|
29
|
-
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
|
|
30
29
|
end
|
|
31
30
|
end
|
|
32
31
|
end
|
package/android/build.gradle
CHANGED
|
@@ -93,7 +93,7 @@ dependencies {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
implementation 'com.mapbox.maps:android:11.7.0'
|
|
96
|
-
implementation 'com.mapspeople.mapsindoors:mapbox-v11:4.8.
|
|
96
|
+
implementation 'com.mapspeople.mapsindoors:mapbox-v11:4.8.13'
|
|
97
97
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
98
98
|
implementation 'androidx.core:core-ktx:1.3.2'
|
|
99
99
|
implementation 'com.github.bumptech.glide:glide:4.16.0'
|
|
@@ -11,6 +11,9 @@ import com.mapbox.maps.CameraState;
|
|
|
11
11
|
import com.mapbox.maps.CoordinateBounds;
|
|
12
12
|
import com.mapbox.maps.EdgeInsets;
|
|
13
13
|
import com.mapbox.maps.MapView;
|
|
14
|
+
import com.mapbox.maps.plugin.animation.CameraAnimationsPlugin;
|
|
15
|
+
import com.mapbox.maps.plugin.animation.CameraAnimationsUtils;
|
|
16
|
+
import com.mapbox.maps.plugin.animation.MapAnimationOptions;
|
|
14
17
|
import com.mapsindoors.core.MPIMapConfig;
|
|
15
18
|
import com.mapsindoors.core.MPPoint;
|
|
16
19
|
import com.mapsindoors.core.OnResultReadyListener;
|
|
@@ -34,7 +37,8 @@ public class MapboxMapView implements RCMapView {
|
|
|
34
37
|
@Override
|
|
35
38
|
public void animateCamera(MPCameraUpdate cameraUpdate, Integer duration, OnResultReadyListener onFinished) {
|
|
36
39
|
CameraOptions cameraOptions = toCameraOptions(cameraUpdate);
|
|
37
|
-
|
|
40
|
+
CameraAnimationsPlugin plugin = CameraAnimationsUtils.getCamera(mMapView);
|
|
41
|
+
plugin.easeTo(cameraOptions, new MapAnimationOptions.Builder().duration(duration).build(), null);
|
|
38
42
|
onFinished.onResultReady(null);
|
|
39
43
|
}
|
|
40
44
|
|
package/app.plugin.js
CHANGED
|
@@ -182,7 +182,6 @@ const {
|
|
|
182
182
|
installer.pods_project.targets.each do |target|
|
|
183
183
|
target.build_configurations.each do |config|
|
|
184
184
|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
|
|
185
|
-
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
|
|
186
185
|
end
|
|
187
186
|
end\n`
|
|
188
187
|
);
|
|
@@ -105,7 +105,7 @@ class MapBoxView: RCMapView {
|
|
|
105
105
|
let camera = mapboxView.mapboxMap.cameraState
|
|
106
106
|
|
|
107
107
|
update = CameraOptions(cameraState: camera)
|
|
108
|
-
update.zoom = CGFloat(cameraUpdate.zoom!)
|
|
108
|
+
update.zoom = camera.zoom + CGFloat(cameraUpdate.zoom!)
|
|
109
109
|
|
|
110
110
|
case "zoomTo":
|
|
111
111
|
let camera = mapboxView.mapboxMap.cameraState
|
|
@@ -139,7 +139,7 @@ class MapBoxView: RCMapView {
|
|
|
139
139
|
|
|
140
140
|
DispatchQueue.main.async { [self] in
|
|
141
141
|
if (duration != 0) {
|
|
142
|
-
mapboxView.
|
|
142
|
+
mapboxView.camera.ease(to: cameraOption, duration: TimeInterval(duration/1000))
|
|
143
143
|
} else {
|
|
144
144
|
mapboxView.mapboxMap.setCamera(to: cameraOption)
|
|
145
145
|
}
|
|
@@ -525,19 +525,21 @@ public class MapControlModule: RCTEventEmitter {
|
|
|
525
525
|
return doReject(reject, message: "mapControl is not available")
|
|
526
526
|
}
|
|
527
527
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
528
|
+
DispatchQueue.main.async {
|
|
529
|
+
if (setup) {
|
|
530
|
+
let delegate = mapsIndoorsData.mapControlListenerDelegate!
|
|
531
|
+
mapControl.delegate = delegate
|
|
531
532
|
|
|
532
|
-
|
|
533
|
-
|
|
533
|
+
let floorSelector = FloorSelector(delegate: delegate)
|
|
534
|
+
floorSelector.autoFloorChange = isAutoFloorChangeEnabled
|
|
534
535
|
|
|
535
|
-
|
|
536
|
-
|
|
536
|
+
mapControl.floorSelector = floorSelector
|
|
537
|
+
mapsIndoorsData.floorSelector = floorSelector
|
|
537
538
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
539
|
+
} else {
|
|
540
|
+
mapControl.floorSelector = nil
|
|
541
|
+
mapsIndoorsData.floorSelector = nil
|
|
542
|
+
}
|
|
541
543
|
}
|
|
542
544
|
|
|
543
545
|
return resolve(nil)
|
package/package.json
CHANGED
|
@@ -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 "MapsIndoorsMapbox11", "4.
|
|
28
|
-
s.dependency "MapsIndoorsCodable", "4.
|
|
27
|
+
s.dependency "MapsIndoorsMapbox11", "4.6.2"
|
|
28
|
+
s.dependency "MapsIndoorsCodable", "4.6.2"
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -45,11 +45,11 @@ export default class MPHighlightBehavior {
|
|
|
45
45
|
*/
|
|
46
46
|
public static create(object?: MPHighlightBehaviorParams): MPHighlightBehavior {
|
|
47
47
|
return new MPHighlightBehavior(
|
|
48
|
-
object?.allowFloorChange
|
|
49
|
-
object?.moveCamera
|
|
50
|
-
object?.animationDuration
|
|
51
|
-
object?.showInfoWindow
|
|
52
|
-
object?.zoomToFit
|
|
48
|
+
object?.allowFloorChange ?? false,
|
|
49
|
+
object?.moveCamera ?? false,
|
|
50
|
+
object?.animationDuration ?? 0,
|
|
51
|
+
object?.showInfoWindow ?? false,
|
|
52
|
+
object?.zoomToFit ?? true
|
|
53
53
|
);
|
|
54
54
|
};
|
|
55
55
|
}
|
|
@@ -43,11 +43,11 @@ export default class MPSelectionBehavior {
|
|
|
43
43
|
*/
|
|
44
44
|
static create(object: MPSelectionBehaviorParams): MPSelectionBehavior {
|
|
45
45
|
return new MPSelectionBehavior(
|
|
46
|
-
object?.allowFloorChange
|
|
47
|
-
object?.moveCamera
|
|
48
|
-
object?.animationDuration
|
|
49
|
-
object?.showInfoWindow
|
|
50
|
-
object?.zoomToFit
|
|
46
|
+
object?.allowFloorChange ?? true,
|
|
47
|
+
object?.moveCamera ?? true,
|
|
48
|
+
object?.animationDuration ?? 500,
|
|
49
|
+
object?.showInfoWindow ?? true,
|
|
50
|
+
object?.zoomToFit ?? true
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
}
|