首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

iOS 依据经纬度翻译成详细位置的各种方法

2012-11-23 
iOS 根据经纬度翻译成详细位置的各种方法首先苹果获取经纬度是//开始点击长按,不然会执行2次。if (sender.s

iOS 根据经纬度翻译成详细位置的各种方法

首先苹果获取经纬度是

    //开始点击长按,不然会执行2次。    if (sender.state==UIGestureRecognizerStateBegan) {        //isLongPress=YES;        CGPoint touchPoint=[sender locationInView:self.myMapView];        CLLocationCoordinate2D touchCoordinate=[self.myMapView convertPoint:touchPoint toCoordinateFromView:self.myMapView];//将触摸点转换经纬度        //反向解析长按时的大头针的信息        location =[[CLLocation alloc]initWithLatitude:touchCoordinate.latitude longitude:touchCoordinate.longitude]; }







热点排行