summaryrefslogtreecommitdiff
path: root/platform/ios/app/MBXUserLocationAnnotationView.m
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/app/MBXUserLocationAnnotationView.m')
-rw-r--r--platform/ios/app/MBXUserLocationAnnotationView.m28
1 files changed, 14 insertions, 14 deletions
diff --git a/platform/ios/app/MBXUserLocationAnnotationView.m b/platform/ios/app/MBXUserLocationAnnotationView.m
index a0347a174f..675a01930a 100644
--- a/platform/ios/app/MBXUserLocationAnnotationView.m
+++ b/platform/ios/app/MBXUserLocationAnnotationView.m
@@ -35,7 +35,7 @@ const CGFloat MBXUserLocationDotSize = 10;
- (void)updateFrameWithSize:(CGSize)size
{
if (CGSizeEqualToSize(self.frame.size, size)) return;
-
+
// Update frame size, keeping the existing center point.
CGRect newFrame = self.frame;
CGPoint oldCenter = self.center;
@@ -59,23 +59,23 @@ const CGFloat MBXUserLocationDotSize = 10;
{
// Accuracy
CGFloat accuracy = self.accuracyInPoints;
-
+
CGFloat center = self.bounds.size.width / 2.0 - accuracy / 2.0;
UIBezierPath *accuracyPath = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(center, center, accuracy, accuracy)];
UIColor *accuracyColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:.4];
[accuracyColor setFill];
[accuracyPath fill];
-
+
// Dot
center = self.bounds.size.width / 2.0 - MBXUserLocationDotSize / 2.0;
UIBezierPath *ovalPath = [UIBezierPath bezierPathWithOvalInRect: CGRectMake(center, center, MBXUserLocationDotSize, MBXUserLocationDotSize)];
[UIColor.greenColor setFill];
[ovalPath fill];
-
+
[UIColor.blackColor setStroke];
ovalPath.lineWidth = 1;
[ovalPath stroke];
-
+
// Accuracy text
UIFont *font = [UIFont systemFontOfSize:11];
[[NSString stringWithFormat:@"%.0f", accuracy]
@@ -89,7 +89,7 @@ const CGFloat MBXUserLocationDotSize = 10;
UIColor* fillColor = [UIColor colorWithRed: 0 green: 0 blue: 0 alpha: 1];
UIColor* strokeColor = [UIColor colorWithRed: 0.592 green: 0.592 blue: 0.592 alpha: 1];
UIColor* fillColor2 = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1];
-
+
UIBezierPath* bezier2Path = [UIBezierPath bezierPath];
[bezier2Path moveToPoint: CGPointMake(30, 7.86)];
[bezier2Path addLineToPoint: CGPointMake(30, 52.66)];
@@ -98,10 +98,10 @@ const CGFloat MBXUserLocationDotSize = 10;
[bezier2Path addCurveToPoint: CGPointMake(30, 7.86) controlPoint1: CGPointMake(-0, -2.17) controlPoint2: CGPointMake(30, -3.05)];
[bezier2Path closePath];
bezier2Path.usesEvenOddFillRule = YES;
-
+
[fillColor setFill];
[bezier2Path fill];
-
+
UIBezierPath* bezier3Path = [UIBezierPath bezierPath];
[bezier3Path moveToPoint: CGPointMake(30, 7.86)];
[bezier3Path addLineToPoint: CGPointMake(30, 52.66)];
@@ -112,7 +112,7 @@ const CGFloat MBXUserLocationDotSize = 10;
[strokeColor setStroke];
bezier3Path.lineWidth = 1;
[bezier3Path stroke];
-
+
UIBezierPath* bezier4Path = [UIBezierPath bezierPath];
[bezier4Path moveToPoint: CGPointMake(15.56, 4.26)];
[bezier4Path addCurveToPoint: CGPointMake(26, 6) controlPoint1: CGPointMake(21, 4.26) controlPoint2: CGPointMake(26, 6)];
@@ -123,10 +123,10 @@ const CGFloat MBXUserLocationDotSize = 10;
[bezier4Path addCurveToPoint: CGPointMake(15.56, 4.26) controlPoint1: CGPointMake(4, 6) controlPoint2: CGPointMake(10.12, 4.26)];
[bezier4Path closePath];
bezier4Path.usesEvenOddFillRule = YES;
-
+
[fillColor2 setFill];
[bezier4Path fill];
-
+
UIBezierPath* rectanglePath = [UIBezierPath bezierPath];
[rectanglePath moveToPoint: CGPointMake(25, 46)];
[rectanglePath addCurveToPoint: CGPointMake(21, 55) controlPoint1: CGPointMake(31, 46) controlPoint2: CGPointMake(28.5, 55)];
@@ -136,11 +136,11 @@ const CGFloat MBXUserLocationDotSize = 10;
[rectanglePath closePath];
[UIColor.whiteColor setFill];
[rectanglePath fill];
-
+
UIBezierPath* bezierPath = [UIBezierPath bezierPath];
[UIColor.whiteColor setFill];
[bezierPath fill];
-
+
UIBezierPath* rectangle2Path = [UIBezierPath bezierPath];
[rectangle2Path moveToPoint: CGPointMake(2, 35)];
[rectangle2Path addCurveToPoint: CGPointMake(4.36, 35) controlPoint1: CGPointMake(2, 39) controlPoint2: CGPointMake(4.36, 35)];
@@ -150,7 +150,7 @@ const CGFloat MBXUserLocationDotSize = 10;
[rectangle2Path closePath];
[UIColor.whiteColor setFill];
[rectangle2Path fill];
-
+
UIBezierPath* rectangle3Path = [UIBezierPath bezierPath];
[rectangle3Path moveToPoint: CGPointMake(28, 35)];
[rectangle3Path addCurveToPoint: CGPointMake(25.64, 35) controlPoint1: CGPointMake(28, 39) controlPoint2: CGPointMake(25.64, 35)];