1.MKMapview 使用的是高德地图
2.打开定位小蓝点的显示
mapview.showsUserLocation = YES;
3.定位到一个区域的函数(会重置旋转角度),可以有一个放大的动画效果
[self.mapView setRegion:MKCoordinateRegionMake(userLocation.location.coordinate, MKCoordinateSpanMake(0.002f, 0.002f)) animated:NO];
4.如果要做一个定位到小蓝点的按钮(并保持旋转角度,放大倍率),可以使用以下函数
[self.mapView setCenterCoordinate:self.userLocation.coordinate animated:YES];
5.如果要修改系统默认的annotation的样式,可以调用
-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation
如果同时不想修改默认userlocation的样式,可以加上
if ([annotation isKindOfClass:[MKUserLocation class]])
return nil;
这样就不会把所有的annotation的样式都修改了
6坐标问题