开发者

How to calculate MKMapView area?

开发者 https://www.devze.com 2023-01-31 22:05 出处:网络
I know the center coordinate (latitude, longitude). How 开发者_运维技巧to calculate top left coordinate and bottom right coordinate ?did you try

I know the center coordinate (latitude, longitude). How 开发者_运维技巧to calculate top left coordinate and bottom right coordinate ?


did you try

– convertPoint:toCoordinateFromView:

convertPoint:toCoordinateFromView: Converts a point in the specified view’s coordinate system to a map coordinate.

  • (CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view Parameters point The point you want to convert. view The view that serves as the reference coordinate system for the point parameter. Return Value The map coordinate at the specified point.

Availability Available in iOS 3.0 and later. Declared In MKMapView.h

shani

0

精彩评论

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