QQ地图

1.遵守代理 和头文件
QMapViewDelegate

import

2.加载地图

QQ地图_第1张图片
Paste_Image.png

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];
    }

你可能感兴趣的:(QQ地图)