From be3fc4413ab2e553c7957721bc3a7a03d414cd64 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Mon, 9 Apr 2018 17:00:45 -0400 Subject: [PATCH] [ios] Change MGLAnnotationView.scalesWithViewingDistance default value to NO --- platform/ios/CHANGELOG.md | 1 + platform/ios/app/MBXViewController.m | 6 ------ platform/ios/src/MGLAnnotationView.h | 8 ++++---- platform/ios/src/MGLAnnotationView.mm | 2 +- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 850c5b19b84..64df3dd0135 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -39,6 +39,7 @@ The 4.0._x_ series of releases will be the last to support iOS 8. The minimum iO ### Annotations +* Changed the default value of `MGLAnnotationView.scalesWithViewingDistance` to `NO`, to improve performance. If your use case involves many annotation views, consider keeping this property disabled. ([#11636](https://github.com/mapbox/mapbox-gl-native/pull/11636)) * Fixed an issue preventing `MGLAnnotationImage.image` from being updated. ([#10372](https://github.com/mapbox/mapbox-gl-native/pull/10372)) * Improved performance of `MGLAnnotationView`-backed annotations that have `scalesWithViewingDistance` enabled. ([#10951](https://github.com/mapbox/mapbox-gl-native/pull/10951)) * Fixed an issue where tapping a group of annotations may not have selected the nearest annotation. ([#11438](https://github.com/mapbox/mapbox-gl-native/pull/11438)) diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index b871a459c97..07d684cd647 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -1810,12 +1810,6 @@ - (MGLAnnotationView *)mapView:(MGLMapView *)mapView viewForAnnotation:(id)annotation reuseIde _lastAppliedScaleTransform = CATransform3DIdentity; _annotation = annotation; _reuseIdentifier = [reuseIdentifier copy]; - _scalesWithViewingDistance = YES; + _scalesWithViewingDistance = NO; _enabled = YES; }