From cb59589954271d6dbaecba1fe4230c22f5bbab21 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Tue, 23 Aug 2016 11:34:26 -0400 Subject: [ios] Stop exaggerating heading accuracy indicator size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 1.5× exaggeration has been removed. - Maximum accuracy (smallest size) has been increased to 20°. --- platform/ios/CHANGELOG.md | 1 + platform/ios/src/MGLFaux3DUserLocationAnnotationView.m | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 07518c1fad..b8a7f7e749 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -29,6 +29,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * To customize the appearance of the user location annotation, subclass the newly added MGLUserLocationAnnotationView class and implement `-[MGLMapViewDelegate mapView:viewForAnnotation:]`. ([#5882](https://github.com/mapbox/mapbox-gl-native/pull/5882)) * Fixed an issue causing the user dot’s accuracy ring to wobble while zooming in and out. ([#6019](https://github.com/mapbox/mapbox-gl-native/pull/6019)) +* Heading accuracy indicator sizing has been changed to appear more precise. ([#6120](https://github.com/mapbox/mapbox-gl-native/pull/6120)) ### Annotations diff --git a/platform/ios/src/MGLFaux3DUserLocationAnnotationView.m b/platform/ios/src/MGLFaux3DUserLocationAnnotationView.m index 315bd936e4..2cccc18806 100644 --- a/platform/ios/src/MGLFaux3DUserLocationAnnotationView.m +++ b/platform/ios/src/MGLFaux3DUserLocationAnnotationView.m @@ -502,10 +502,10 @@ const CGFloat MGLUserLocationAnnotationArrowSize = MGLUserLocationAnnotationPuck { CGFloat accuracy = self.userLocation.heading.headingAccuracy; - // size the mask using exagerated accuracy, but keep within a good display range - CGFloat clippingDegrees = 90 - (accuracy * 1.5); - clippingDegrees = fmin(clippingDegrees, 55); - clippingDegrees = fmax(clippingDegrees, 10); + // size the mask using accuracy, but keep within a good display range + CGFloat clippingDegrees = 90 - accuracy; + clippingDegrees = fmin(clippingDegrees, 70); // most accurate + clippingDegrees = fmax(clippingDegrees, 10); // least accurate CGRect ovalRect = CGRectMake(0, 0, MGLUserLocationAnnotationHaloSize, MGLUserLocationAnnotationHaloSize); UIBezierPath *ovalPath = UIBezierPath.bezierPath; -- cgit v1.2.1