는
googleMapCircle.tappable = true;
그리고 드래그 원을 달성하기 위해 구글 맵의 대리자 메서드 didTapOverlay
를 추가 할 필요가 설정 슬라이더 값 변경 방법에 아래 코드 추가 :
- (IBAction)sliderValueChnage:(id)sender {
_slider = (UISlider*)sender;
NSLog(@"slider value = %f", _slider.value);
int radius=(int)_slider.value;
_lblRadius.text=[NSString stringWithFormat:@"%d m",radius];
//For achieve circle radius increase or decrease properly ,first clear map view
[_googleMap clear];
//Set centre coordinate where you want to draw circle
CLLocationCoordinate2D circleCenter = CLLocationCoordinate2DMake(_locationManager.location.coordinate.latitude, _locationManager.location.coordinate.longitude);
// Draw circle on google map
GMSCircle *googleMapCircle = [GMSCircle circleWithPosition:circleCenter
radius:_slider.value];
googleMapCircle.fillColor = [[UIColor purpleColor] colorWithAlphaComponent:.4f];
googleMapCircle.strokeColor = [UIColor purpleColor];
googleMapCircle.strokeWidth = 5;
googleMapCircle.tappable=YES;
googleMapCircle.map = _googleMap;
}