有可能,在 MapKit 中,只禁用放大吗?

Is possible, in MapKit, disable only zoom in?

内部:

mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool) 

我计算了一个水平缩放。如果此缩放级别满足条件,我想禁用 only 放大和缩小保持启用状态。 可能吗?

您可以将 isZoomEnabled 设置为 false:

This property controls only user interactions with the map. If you set the value of this property to false, you may still change the zoom level programmatically by changing the value in the region property.

根据您的需要,您可以

mapView.isZoomEnabled = false

在需要的时候。例如,如果要增加和禁用它,您可以检查缩放级别。

此外,Check whether zoom level changed 可能对您的情况有用。

不可能只禁用 MapKit 的放大功能。我的解决方案是:检查zoomLevel,如果它大于一个前缀级别重新定位映射到一个固定的zoomLevel。