diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2020-02-27 13:09:39 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2020-02-27 17:14:20 -0800 |
commit | 206b9bde5ed9204de6ec18c0d37495db7c30aa09 (patch) | |
tree | 0049d4d6bd9195c194c0fe96665ba72c92f00da5 /platform/ios/src/MGLUserLocationHeadingArrowLayer.m | |
parent | bd252e16a3574efd11cca57917f52e6d1b2dd0a2 (diff) | |
download | qtlocation-mapboxgl-206b9bde5ed9204de6ec18c0d37495db7c30aa09.tar.gz |
[ios, macos] Deleted iOS/macOS map SDK sources, resources, scripts
Diffstat (limited to 'platform/ios/src/MGLUserLocationHeadingArrowLayer.m')
-rw-r--r-- | platform/ios/src/MGLUserLocationHeadingArrowLayer.m | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/platform/ios/src/MGLUserLocationHeadingArrowLayer.m b/platform/ios/src/MGLUserLocationHeadingArrowLayer.m deleted file mode 100644 index d81cb5a09a..0000000000 --- a/platform/ios/src/MGLUserLocationHeadingArrowLayer.m +++ /dev/null @@ -1,59 +0,0 @@ -#import "MGLUserLocationHeadingArrowLayer.h" - -#import "MGLFaux3DUserLocationAnnotationView.h" -#import "MGLGeometry.h" - -const CGFloat MGLUserLocationHeadingArrowSize = 8; - -@implementation MGLUserLocationHeadingArrowLayer - -- (instancetype)initWithUserLocationAnnotationView:(MGLUserLocationAnnotationView *)userLocationView -{ - CGFloat size = userLocationView.bounds.size.width + MGLUserLocationHeadingArrowSize; - - self = [super init]; - self.bounds = CGRectMake(0, 0, size, size); - self.position = CGPointMake(CGRectGetMidX(userLocationView.bounds), CGRectGetMidY(userLocationView.bounds)); - self.path = [self arrowPath]; - self.fillColor = userLocationView.tintColor.CGColor; - self.shouldRasterize = YES; - self.rasterizationScale = UIScreen.mainScreen.scale; - self.drawsAsynchronously = YES; - - self.strokeColor = UIColor.whiteColor.CGColor; - self.lineWidth = 1.0; - self.lineJoin = kCALineJoinRound; - - return self; -} - -- (void)updateHeadingAccuracy:(CLLocationDirection)accuracy -{ - // unimplemented -} - -- (void)updateTintColor:(CGColorRef)color -{ - self.fillColor = color; -} - -- (CGPathRef)arrowPath { - CGFloat center = roundf(CGRectGetMidX(self.bounds)); - CGFloat size = MGLUserLocationHeadingArrowSize; - - CGPoint top = CGPointMake(center, 0); - CGPoint left = CGPointMake(center - size, size); - CGPoint right = CGPointMake(center + size, size); - CGPoint middle = CGPointMake(center, size / M_PI); - - UIBezierPath *bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint:top]; - [bezierPath addLineToPoint:left]; - [bezierPath addQuadCurveToPoint:right controlPoint:middle]; - [bezierPath addLineToPoint:top]; - [bezierPath closePath]; - - return bezierPath.CGPath; -} - -@end |