[ios] Meters per point at latitude
Renamed -metersPerPixelAtLatitude: to -metersPerPointAtLatitude:, leaving the old name as a deprecated alias. In Cocoa Touch terminology, “point” is the visual unit backed by pixels.
This commit is contained in:
committed by
Minh Nguyễn
parent
35aeb06fe2
commit
d745ff0923
@@ -436,7 +436,7 @@ const CGFloat MGLUserLocationAnnotationArrowSize = MGLUserLocationAnnotationPuck
|
||||
- (CGFloat)calculateAccuracyRingSize
|
||||
{
|
||||
CGFloat latRadians = self.annotation.coordinate.latitude * M_PI / 180.0f;
|
||||
CGFloat pixelRadius = self.annotation.location.horizontalAccuracy / cos(latRadians) / [self.mapView metersPerPixelAtLatitude:self.annotation.coordinate.latitude];
|
||||
CGFloat pixelRadius = self.annotation.location.horizontalAccuracy / cos(latRadians) / [self.mapView metersPerPointAtLatitude:self.annotation.coordinate.latitude];
|
||||
|
||||
return pixelRadius * 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user