大头针飘移问题

- (MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation:(id <MKAnnotation>)annotation

{   

//在当前位置信息框上添加自定义按钮

MKPinAnnotationView *pinAnnotation = nil;

//[self.mapView removeAnnotations:self.mapView.annotations];

//[self GetAddressByCoordinate:location.latitude longitude:location.longitude];//获取地点信息

static NSString *defaultPinID = @"Annotation";

pinAnnotation = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:defaultPinID];

//pinAnnotation.centerOffset = CGPointMake(7,-15);  //加上这句,缩小地图时,大头针会漂移。去掉就可以了

        //pinAnnotation.calloutOffset = CGPointMake(-8,0); //加上这句,缩小地图时,大头针会漂移。去掉就可以了

}

posted on 2011-08-30 11:33  风乔  阅读(151)  评论(0编辑  收藏  举报

导航