summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-09-10 23:20:37 -0700
committerMinh Nguyễn <mxn@1ec5.org>2017-11-02 15:19:54 -0700
commitac7ce2f6afccf395dd771f76534e8d114bedcf86 (patch)
tree81b022d007631726db0080fec958b8b8fb30c445
parent788482e1159c0a7cbd194485ca423d9b7bfcc0cc (diff)
downloadqtlocation-mapboxgl-ac7ce2f6afccf395dd771f76534e8d114bedcf86.tar.gz
[ios] Thickened road accessibility elements
-rw-r--r--platform/ios/src/MGLMapView.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index d5ea8c7f90..0c5ff378dd 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -2637,7 +2637,10 @@ public:
[path moveToPoint:point];
}
}
- UIBezierPath *screenPath = UIAccessibilityConvertPathToScreenCoordinates(path, self);
+ CGPathRef strokedCGPath = CGPathCreateCopyByStrokingPath(path.CGPath, NULL, MGLAnnotationAccessibilityElementMinimumSize.width, kCGLineCapButt, kCGLineJoinMiter, 0);
+ UIBezierPath *strokedPath = [UIBezierPath bezierPathWithCGPath:strokedCGPath];
+ CGPathRelease(strokedCGPath);
+ UIBezierPath *screenPath = UIAccessibilityConvertPathToScreenCoordinates(strokedPath, self);
element.accessibilityPath = screenPath;
}