@rnmapbox/maps 10.1.1 → 10.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/ios/RNMBX/RNMBXMapView.swift +14 -3
- package/package.json +1 -1
|
@@ -273,6 +273,7 @@ open class RNMBXMapView: UIView {
|
|
|
273
273
|
case scaleBar
|
|
274
274
|
case onLongPress
|
|
275
275
|
case onPress
|
|
276
|
+
case zoomEnabled
|
|
276
277
|
case scrollEnabled
|
|
277
278
|
case rotateEnabled
|
|
278
279
|
case pitchEnabled
|
|
@@ -298,6 +299,8 @@ open class RNMBXMapView: UIView {
|
|
|
298
299
|
map.applyOnLongPress()
|
|
299
300
|
case .onPress:
|
|
300
301
|
map.applyOnPress()
|
|
302
|
+
case .zoomEnabled:
|
|
303
|
+
map.applyZoomEnabled()
|
|
301
304
|
case .scrollEnabled:
|
|
302
305
|
map.applyScrollEnabled()
|
|
303
306
|
case .rotateEnabled:
|
|
@@ -661,10 +664,18 @@ open class RNMBXMapView: UIView {
|
|
|
661
664
|
changes.apply(self)
|
|
662
665
|
}
|
|
663
666
|
|
|
667
|
+
var zoomEnabled: Bool? = nil
|
|
664
668
|
@objc public func setReactZoomEnabled(_ value: Bool) {
|
|
665
|
-
self.
|
|
666
|
-
|
|
667
|
-
|
|
669
|
+
self.zoomEnabled = value
|
|
670
|
+
changed(.zoomEnabled)
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
func applyZoomEnabled() {
|
|
674
|
+
if let value = zoomEnabled {
|
|
675
|
+
self.mapView.gestures.options.quickZoomEnabled = value
|
|
676
|
+
self.mapView.gestures.options.doubleTapToZoomInEnabled = value
|
|
677
|
+
self.mapView.gestures.options.pinchZoomEnabled = value
|
|
678
|
+
}
|
|
668
679
|
}
|
|
669
680
|
|
|
670
681
|
var scrollEnabled: Bool? = nil
|