添加、移除地图周边范围蓝线

//初始化地图

MKMapView  *mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];

 

//根据指定坐标点,添加范围线

 CLLocationCoordinate2D defaultCoordinate;
  defaultCoordinate.latitude = 0.0;
  defaultCoordinate.longitude = 0.0;

 

int searchRadius = 5000;

[mapView addOverlay:[MKCircle circleWithCenterCoordinate:defaultCoordinate radius:searchRadius]];

 

//移除范围线

MKCircle *circle = (MKCircle *)[mapView.overlays objectAtIndex:0];
[mapView removeOverlay:circle];

你可能感兴趣的:(添加、移除地图周边范围蓝线)