summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2018-02-08 10:38:12 -0500
committerJulian Rex <julian.rex@mapbox.com>2018-02-09 16:33:29 -0500
commit71ac206d9f38913856ff5e3851744a8d7be641e5 (patch)
treebac21ea227a6af9231e782f5993e80a7cb4c3942
parente906f24c882cd4c6ca0a9003eada3cce293f923f (diff)
downloadqtlocation-mapboxgl-71ac206d9f38913856ff5e3851744a8d7be641e5.tar.gz
[ios] Re-adds missing check for conformance, and addresses some ci test issues.
-rw-r--r--platform/ios/src/MGLMapView.mm2
-rw-r--r--platform/ios/test/MGLMapViewDelegateIntegrationTests.swift11
2 files changed, 12 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index dae9988c79..bf9c8626e7 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -5493,7 +5493,7 @@ public:
{
[self.delegate mapView:self regionDidChangeAnimated:animated reason:self.cameraChangeReason];
}
- else
+ else if (respondsToSelector)
{
[self.delegate mapView:self regionDidChangeAnimated:animated];
}
diff --git a/platform/ios/test/MGLMapViewDelegateIntegrationTests.swift b/platform/ios/test/MGLMapViewDelegateIntegrationTests.swift
index 875b4a34da..6d8a908597 100644
--- a/platform/ios/test/MGLMapViewDelegateIntegrationTests.swift
+++ b/platform/ios/test/MGLMapViewDelegateIntegrationTests.swift
@@ -11,8 +11,12 @@ class MGLMapViewDelegateIntegrationTests: XCTestCase {
extension MGLMapViewDelegateIntegrationTests: MGLMapViewDelegate {
+ func mapViewRegionIsChanging(_ mapView: MGLMapView) {}
+
func mapViewRegionIsChanging(_ mapView: MGLMapView, reason: MGLCameraChangeReason) {}
+ func mapView(_ mapView: MGLMapView, regionIsChangingWithReason reason: MGLCameraChangeReason) {}
+
func mapView(_ mapView: MGLMapView, didChange mode: MGLUserTrackingMode, animated: Bool) {}
func mapViewDidFinishLoadingMap(_ mapView: MGLMapView) {}
@@ -33,8 +37,14 @@ extension MGLMapViewDelegateIntegrationTests: MGLMapViewDelegate {
func mapView(_ mapView: MGLMapView, didDeselect annotation: MGLAnnotation) {}
+ func mapView(_ mapView: MGLMapView, didSingleTapAt coordinate: CLLocationCoordinate2D) {}
+
+ func mapView(_ mapView: MGLMapView, regionDidChangeAnimated animated: Bool) {}
+
func mapView(_ mapView: MGLMapView, regionDidChangeAnimated animated: Bool, reason: MGLCameraChangeReason) {}
+ func mapView(_ mapView: MGLMapView, regionWillChangeAnimated animated: Bool) {}
+
func mapView(_ mapView: MGLMapView, regionWillChangeAnimated animated: Bool, reason: MGLCameraChangeReason) {}
func mapViewDidFailLoadingMap(_ mapView: MGLMapView, withError error: Error) {}
@@ -79,4 +89,5 @@ extension MGLMapViewDelegateIntegrationTests: MGLMapViewDelegate {
func mapView(_ mapView: MGLMapView, shouldChangeFrom oldCamera: MGLMapCamera, to newCamera: MGLMapCamera) -> Bool { return false }
+ func mapView(_ mapView: MGLMapView, shouldChangeFrom oldCamera: MGLMapCamera, to newCamera: MGLMapCamera, reason: MGLCameraChangeReason) -> Bool {}
}