问题描述
我想知道iphone编程中 MKMapView
的当前缩放级别,我该怎么做?
实际上我有一个应用程序,只需要几个参数(从中心到角落的 MKMapView
)正在返回商店详细信息,当我在 MKMapView
,半径非常高,当Radius较小时它会改变,所以我想知道缩放级别并根据它设置我的webservice,我怎样才能获得缩放级别当前 MKMapView
可见区域?
I want to know the current zoom level of MKMapView
in iphone programming, how can I do that?Actually I have one app, that is taking few arguments(Radius from center to corner of MKMapView
) are returning the store details in that are, when I am on MKMapView
, the radius is very high and it changes when Radius is smaller, so I want to know the zoom level and setup my webservice according to that, How can I get zoom level of current MKMapView
visible area?
推荐答案
您可以使用 span
在 MKMapView
的区域
属性中。它的定义如下:
You can use span
inside the region
property of the MKMapView
. It is defined like this:
typedef struct {
CLLocationDegrees latitudeDelta;
CLLocationDegrees longitudeDelta;
} MKCoordinateSpan;
看看。这里有很好的解释。
Take a look at the documentation. It is well explained there.
这篇关于如何找到MKMapView的当前缩放级别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!