摘要: - (void)viewDidLoad { [super viewDidLoad]; // 创建地址解析器 self.geocoder = [[CLGeocoder alloc] init]; } - (IBAction)encodeTapped:(id)sender { // 获取用户输入的地址字 阅读全文
posted @ 2016-06-13 00:35 Yevgeni 阅读(1006) 评论(0) 推荐(0) 编辑
摘要: - (void)clickLongPress:(UILongPressGestureRecognizer *)longPress { CGPoint point = [longPress locationInView:mapView]; CLLocationCoordinate2D coord = 阅读全文
posted @ 2016-06-13 00:32 Yevgeni 阅读(1044) 评论(0) 推荐(0) 编辑
摘要: 获取当前位置需要改plist文件 在plist文件加入 NSLocationWhenInUseUsageDescription 字段 /** 初始化一个管理器对象 */ locationManager = [[CLLocationManager alloc] init]; /** * 设置代理 */ 阅读全文
posted @ 2016-06-12 23:38 Yevgeni 阅读(5142) 评论(0) 推荐(0) 编辑
摘要: /** 初始化一个mapView 需导入 #import <MapKit/MapKit.h> - returns: 返回一个mapView对象 */ mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0,WIDTH, HEIGHT-20 阅读全文
posted @ 2016-06-12 23:36 Yevgeni 阅读(227) 评论(0) 推荐(0) 编辑
摘要: /** * 初始化一个经纬度结构体 */ CLLocationCoordinate2D center = {[latitudeTF.text floatValue],[longitudeTF.text floatValue]}; /** * region表示地图中的一块区域,它有两个字段一个是cen 阅读全文
posted @ 2016-06-12 23:35 Yevgeni 阅读(2819) 评论(0) 推荐(0) 编辑
摘要: /** 初始化一个mapView 需导入 #import <MapKit/MapKit.h> - returns: 返回一个mapView对象 */ mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0,WIDTH, HEIGHT-20 阅读全文
posted @ 2016-06-12 23:28 Yevgeni 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 获取当前位置需要改plist文件 在plist文件加入 NSLocationWhenInUseUsageDescription 字段 /** 初始化一个管理器对象 */ locationManager = [[CLLocationManager alloc] init]; /** * 设置代理 */ 阅读全文
posted @ 2016-06-12 23:19 Yevgeni 阅读(229) 评论(0) 推荐(0) 编辑