检测用户何时缩放mapkit允许的最小高程

时间:2011-07-19 13:09:31

标签: ios mapkit mkmapview

当用户放大Mapkit允许的最大级别时,我想显示所有引脚。 怎么做?

1 个答案:

答案 0 :(得分:1)

通过在regionDidChange方法中侦听map span的longitudeDelta。 通过测试和记录,最小经度Delta似乎是0.000858。

- (void)mapView:(MKMapView *)aMapView regionDidChangeAnimated:(BOOL)animated{
    NSLog(@"Deltalong: %f", aMapView.region.span.longitudeDelta);
    if (aMapView.region.span.longitudeDelta <= 0.000858){
        //add your annotations
    }
}