1.遵守代理 和头文件
QMapViewDelegate
import <QMapKit/QMapKit.h>
2.加载地图
3.代理
pragma mark -mapViewDelegate-
(void)mapViewWillStartLocatingUser:(QMapView *)mapView
{
//获取开始定位的状态
}(void)mapViewDidStopLocatingUser:(QMapView *)mapView
{
NSLog(@"stop");
}-
(void)mapView:(QMapView *)mapView didUpdateUserLocation:(QUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation
{
// NSLog(@"%f--%f",mapView.userLocation.coordinate.latitude,mapView.userLocation.coordinate.longitude);_mapView.showsUserLocation = NO;
CLLocationCoordinate2D coor = mapView.userLocation.coordinate;
self.coor = coor;//刷新位置
[self startHttpRequestWithCoordinate:mapView.userLocation.coordinate];
}