百度地图添加标注跟气泡

 //目标地图 显示制定区域
    BMKCoordinateRegion region;
    region.center.latitude = _nearlatitude;
    region.center.longitude = _nearlongitude;
    region.span.latitudeDelta = 0.05;
    region.span.longitudeDelta = 0.05;
    _mapView.region = region;
    //添加标注
    BMKPointAnnotation *annotation = [[BMKPointAnnotation alloc] init];
    CLLocationCoordinate2D mudiWeizhiCoord = CLLocationCoordinate2DMake(_nearlatitude, _nearlongitude);
    annotation.coordinate = mudiWeizhiCoord;
    annotation.title = _mubiaoWeizhi;
    [_mapView addAnnotation:annotation];
    [_mapView selectAnnotation:annotation animated:YES];//气泡显示

你可能感兴趣的:(ios,百度地图,气泡,标注)