开发者

iPhone App- MkMapview get the range of area visible in map view

in ipohne app Using mapView how to detect the the range of area visible in mapview (i mean range of longitude and latitude which binds the total area)

and also when applying zoomin or zoomout in mapview, how to get notified that the range is changed with gest开发者_运维技巧ure controlled (Pinch gesture)?


Your MapView instance has a .region property that you can use to find the currently displayed visible area (ie. self.mapView.region).

The MKMapViewDelegate class has events you can implement for the range change, but it's not tied to the pinch specifically - it's also fired if you double tap on the map (to zoom in).

- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜