File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ open class MapViewController: UIViewController {
5151 open var pinColor : UIColor ?
5252 open var searchDebounceDuration : TimeInterval = 0.6
5353 open var selectedMapItem : MKMapItem ?
54+ open var shouldRedoSearchOnPan = true
5455 open var userLocationDebounceDuration : TimeInterval = 0.6
5556 open var zoomedInSpan : CLLocationDegrees = 0.01
5657
@@ -557,7 +558,7 @@ extension MapViewController: MKMapViewDelegate {
557558 open func mapView( _ mapView: MKMapView , regionDidChangeAnimated animated: Bool ) {
558559 if isDeferringSelection {
559560 performDeferredSelection ( animated: animated)
560- } else {
561+ } else if shouldRedoSearchOnPan {
561562 guard !hasSelectedPin && !isQuerying else { return }
562563 guard hasSearch && ( wasMapPanned && !animated) else { return }
563564 NSObject . cancelPreviousPerformRequests ( withTarget: self , selector: #selector( redoSearch) , object: nil )
You can’t perform that action at this time.
0 commit comments