随笔分类 - gooleMap
Apple内部对MKUserLocation去除偏移的方法。
摘要:找到Apple内部对MKUserLocation去除偏移的方法。[MKLocationManager _applyChinaLocationShift:(CLLocation*)arg]这个方法返回去除偏移后的CLLocation*。Code:@interfaceMKLocationManager- (CLLocation*)_applyChinaLocationShift:(CLLocation*)arg;- (BOOL)chinaShiftEnabled;+ (id)sharedLocationManager;@endCLLocationManager's Delegate:- (
阅读全文
MKMAPVIEW上长按屏幕,添加大头针
摘要:在做地图有关的程序时,我们经常需要用户在地图上指定位置我们再用大头针标记。1、在viewDidLoad中添加我们要捕获的手势:UILongPressGestureRecognizer *lpress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];lpress.minimumPressDuration = 0.5;//按0.5秒响应longPress方法lpress.allowableMovement = 10.0;[m_mapView addGestureRec
阅读全文
iphone定位 基本知识
摘要:找到一个关于iphone定位的的资料,收藏一下其实使用iphone的定位系统开发软件是很简单的一件事,下面我们就来认识一下iphone的定位系统的使用。1.Getting the User’s Current Location获取用户当前位置。获取位置的方式有三种:GPS, cell tower triangulation(蜂窝站点), 和Wi-Fi Positioning Service (WPS).其中GPS是最精确的定位方式,但是在第一代iphone上没有。GPS是通过读取很多卫星微波信号来确定当前位置的。蜂窝站点通过 iphone周围的站点计算出来的,在蜂窝站点密集的地方使用这种技术可
阅读全文
MKMapView学习笔记(转)
摘要:一.基本知识 目前主流的智能手机大部分都支持GoogleMap地图程序,而手机上的地图程序确实能给我们的出行带来很大的方便。在iPhone中利用MapKit框架可以很方便的显示Google地图,并且可以在地图上添加标注。二.具体介绍1.MKMapView的显示(1)创建MKMapViewCGRect rect = CGRectMake(0, 20, 320, 460);MKMapView *mapView = [[MKMapView alloc] initWithFrame:rect];(2)设定经纬度CLLocationCoordinate2D theCoordinate;theCoordi
阅读全文
MapKit之在地图上加pin(转)
摘要:在MKMapView中加pin其实就是加入MKAnnonation, 可以加入服和MKAnnonation协议的pin,下面展示一下方法。1.首先创建一个服和MKAnnonation协议的委托类@interface AnnotationDelegate : NSObject <MKAnnotation> { CLLocationCoordinate2D coordinate; } @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; - (id) initWithCoordinate:(CLLocati
阅读全文
浙公网安备 33010602011771号