From 4ea782be113224f7f28e974ea38599638358b136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 7 Jun 2016 14:16:28 -0700 Subject: [PATCH 01/16] [ios] Updated changelog for v3.3.0 --- platform/ios/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index fd176a947..f0695b6f2 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -2,7 +2,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. -## master +## 3.3.0 - Applications linking against the SDK static framework no longer need to add `-ObjC` to the Other Linker Flags (`OTHER_LDFLAGS`) build setting. If you previously added this flag solely for this SDK, removing the flag may potentially reduce the overall size of your application. ([#4641](https://github.com/mapbox/mapbox-gl-native/pull/4641)) - Removed the `armv7s` slice from the SDK to reduce its size. iPhone 5 and iPhone 5c automatically use the `armv7` slice instead. ([#4641](https://github.com/mapbox/mapbox-gl-native/pull/4641)) From 0b6daae05d88ca821f60af9760ade712ca3bb204 Mon Sep 17 00:00:00 2001 From: Jesse Bounds Date: Tue, 7 Jun 2016 15:08:11 -0700 Subject: [PATCH 02/16] [ios] Updated changelog for v3.2.3 --- platform/ios/CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index f0695b6f2..a22e7feea 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -28,13 +28,17 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON - Added a `-reloadStyle:` action to MGLMapView to force a reload of the current style. ([#4728](https://github.com/mapbox/mapbox-gl-native/pull/4728)) - A more specific user agent string is now sent with style and tile requests. ([#4012](https://github.com/mapbox/mapbox-gl-native/pull/4012)) - Mapbox Telemetry is automatically disabled while the host application is running in the iOS Simulator. ([#4726](https://github.com/mapbox/mapbox-gl-native/pull/4726)) -- Fixed an issue preventing `-[MGLMapViewDelegate mapViewDidFinishLoadingMap:]` from being called when returning to the view controller containing the map view from another view controller. ([#5164](https://github.com/mapbox/mapbox-gl-native/pull/5164)) - Suppressed “Unable to make space for entry” console spew. ([#4708](https://github.com/mapbox/mapbox-gl-native/pull/4708)) - Removed unused SVG files from the SDK’s resource bundle. ([#4641](https://github.com/mapbox/mapbox-gl-native/pull/4641)) - Deprecated `-[MGLMapView emptyMemoryCache]`. ([#4725](https://github.com/mapbox/mapbox-gl-native/pull/4725)) - Added `MGLCoordinateInCoordinateBounds()`, a function that tests whether or not a coordinate is in a given bounds. ([#5053](https://github.com/mapbox/mapbox-gl-native/pull/5053)) - Added a new option to `MGLMapDebugMaskOptions`, `MGLMapDebugWireframesMask`, that shows wireframes instead of the usual rendered output. ([#4359](https://github.com/mapbox/mapbox-gl-native/pull/4359)) +## 3.2.3 + +- Fixed an issue preventing `-[MGLMapViewDelegate mapViewDidFinishLoadingMap:]` from being called when returning to the view controller containing the map view from another view controller. ([#5164](https://github.com/mapbox/mapbox-gl-native/pull/5164)) +- Declarations in the API documentation are shown in both Objective-C and Swift. ([realm/jazzy#530](https://github.com/realm/jazzy/pull/530)) + ## 3.2.2 - Existing MGLStyle class methods that return default style URLs have been deprecated in favor of new methods that require an explicit style version parameter. The deprecated, unversioned methods continue to return version 8 of the respective styles and will not be updated as new versions of the styles are released. ([#4759](https://github.com/mapbox/mapbox-gl-native/pull/4759)) From 4e808994cb7611090c234875cffc18f0f3ef8088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Wed, 8 Jun 2016 14:25:08 -0700 Subject: [PATCH 03/16] [ios] Update annotation views before informing delegate (#5287) On each frame update, update annotation views before informing the delegate of the new frame. This allows the delegate to manipulate annotation views without fear of the SDK overriding those modifications. --- platform/ios/src/MGLMapView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 5d1bcb110..f5720af66 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -4454,11 +4454,11 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) case mbgl::MapChangeDidFinishRenderingFrame: case mbgl::MapChangeDidFinishRenderingFrameFullyRendered: { + [self updateAnnotationViews]; if ([self.delegate respondsToSelector:@selector(mapViewDidFinishRenderingFrame:fullyRendered:)]) { [self.delegate mapViewDidFinishRenderingFrame:self fullyRendered:(change == mbgl::MapChangeDidFinishRenderingFrameFullyRendered)]; } - [self updateAnnotationViews]; break; } } From dd565b701b20cac69f7a84a02e7bc8a783c92bb6 Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Thu, 9 Jun 2016 20:05:15 -0400 Subject: [PATCH 04/16] [ios] Support for a customizable zoom gesture centering strategy. (#5302) * [ios] Support for a customizable zoom gesture centering strategy. We introduce a new MGLZoomGestureCentering enum and corresponding zoomGestureCentering property on MGLMapView. Currently, Mapbox automatically adjusts the center of the map relative to the user's gesture location, but for some applications (e.g Uber, Lyft) it is preferable to keep the map center "locked" in response to zoom gestures. Exisiting code will retain its current behavior without modification and will implicitly use the default value of MGLZoomGestureCenteringFollowsTouch. New code can specify MGLZoomGestureCenteringLockedInPlace to get the new "locked" behavior. * [ios] Added -anchorPointForGesture: to MGLMapView Cherry-picked from b915f05a069d4658cc11d91a4bae2ef52c5fcbf1. --- platform/ios/src/MGLMapView.h | 19 ++++++++++++ platform/ios/src/MGLMapView.mm | 54 +++++++++++++++------------------- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 63d799bda..09142c409 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -762,6 +762,25 @@ IB_DESIGNABLE */ - (MGLMapCamera *)cameraThatFitsCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets; +/** + Returns the point in this view's coordinate system on which to "anchor" in + response to a user-initiated gesture. + + For example, a pinch-to-zoom gesture would anchor the map at the midpoint of + the pinch. + + If the `userTrackingMode` property is not `MGLUserTrackingModeNone`, the + user annotation is used as the anchor point. + + Subclasses may override this method to provide specialized behavior - for + example, anchoring on the map's center point to provide a "locked" zooming + mode. + + @param gesture An anchorable user gesture. + @return The point on which to anchor in response to the gesture. + */ +- (CGPoint)anchorPointForGesture:(UIGestureRecognizer *)gesture; + /** The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index f5720af66..6549ca16e 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1235,11 +1235,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) _mbglMap->cancelTransitions(); - CGPoint centerPoint = [pinch locationInView:pinch.view]; - if (self.userTrackingMode != MGLUserTrackingModeNone) - { - centerPoint = self.userLocationAnnotationViewCenter; - } + CGPoint centerPoint = [self anchorPointForGesture:pinch]; if (pinch.state == UIGestureRecognizerStateBegan) { @@ -1311,7 +1307,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) [self unrotateIfNeededForGesture]; } - _previousPinchCenterCoordinate = [self convertPoint:[pinch locationInView:pinch.view] toCoordinateFromView:self]; + _previousPinchCenterCoordinate = [self convertPoint:centerPoint toCoordinateFromView:self]; _previousPinchNumberOfTouches = pinch.numberOfTouches; } @@ -1321,11 +1317,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) _mbglMap->cancelTransitions(); - CGPoint centerPoint = [rotate locationInView:rotate.view]; - if (self.userTrackingMode != MGLUserTrackingModeNone) - { - centerPoint = self.userLocationAnnotationViewCenter; - } + CGPoint centerPoint = [self anchorPointForGesture:rotate]; if (rotate.state == UIGestureRecognizerStateBegan) { @@ -1454,11 +1446,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) if (doubleTap.state == UIGestureRecognizerStateEnded) { [self trackGestureEvent:MGLEventGestureDoubleTap forRecognizer:doubleTap]; - CGPoint gesturePoint = [doubleTap locationInView:doubleTap.view]; - if (self.userTrackingMode != MGLUserTrackingModeNone) - { - gesturePoint = self.userLocationAnnotationViewCenter; - } + CGPoint gesturePoint = [self anchorPointForGesture:doubleTap]; mbgl::ScreenCoordinate center(gesturePoint.x, gesturePoint.y); _mbglMap->scaleBy(2, center, MGLDurationInSeconds(MGLAnimationDuration)); @@ -1486,11 +1474,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) } else if (twoFingerTap.state == UIGestureRecognizerStateEnded) { - CGPoint gesturePoint = [twoFingerTap locationInView:twoFingerTap.view]; - if (self.userTrackingMode != MGLUserTrackingModeNone) - { - gesturePoint = self.userLocationAnnotationViewCenter; - } + CGPoint gesturePoint = [self anchorPointForGesture:twoFingerTap]; mbgl::ScreenCoordinate center(gesturePoint.x, gesturePoint.y); _mbglMap->scaleBy(0.5, center, MGLDurationInSeconds(MGLAnimationDuration)); @@ -1528,11 +1512,8 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) if (newZoom < _mbglMap->getMinZoom()) return; - CGPoint centerPoint = self.contentCenter; - if (self.userTrackingMode != MGLUserTrackingModeNone) - { - centerPoint = self.userLocationAnnotationViewCenter; - } + CGPoint centerPoint = [self anchorPointForGesture:quickZoom]; + _mbglMap->scaleBy(powf(2, newZoom) / _mbglMap->getScale(), mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y }); @@ -1564,11 +1545,8 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) CGFloat pitchNew = currentPitch - (gestureDistance / slowdown); - CGPoint centerPoint = self.contentCenter; - if (self.userTrackingMode != MGLUserTrackingModeNone) - { - centerPoint = self.userLocationAnnotationViewCenter; - } + CGPoint centerPoint = [self anchorPointForGesture:twoFingerDrag]; + _mbglMap->setPitch(pitchNew, mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y }); [self notifyMapChange:mbgl::MapChangeRegionIsChanging]; @@ -1578,7 +1556,21 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) [self notifyGestureDidEndWithDrift:NO]; [self unrotateIfNeededForGesture]; } +} +- (CGPoint)anchorPointForGesture:(UIGestureRecognizer *)gesture { + if (self.userTrackingMode != MGLUserTrackingModeNone) + { + return self.userLocationAnnotationViewCenter; + } + + // Special case for two-finger drag and quickzoom + if ([gesture isKindOfClass:[UIPanGestureRecognizer class]] || [gesture isKindOfClass:[UILongPressGestureRecognizer class]]) + { + return self.contentCenter; + } + + return [gesture locationInView:gesture.view]; } - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer From 383df9dd21e518d3894072390a459a80487348ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Thu, 9 Jun 2016 17:11:01 -0700 Subject: [PATCH 05/16] [ios] Updated changelog for #5302 Cherry-picked from 6998479d05497baf57eb264e92807d327920f7d6. --- platform/ios/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index a22e7feea..60b3bad1d 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -14,6 +14,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON - An MGLPolygon can now have interior polygons, representing holes knocked out of the overall shape. ([#5110](https://github.com/mapbox/mapbox-gl-native/pull/5110)) - `MGLOfflinePackProgress` now indicates how many tiles have been downloaded and how much space they take up. ([#4874](https://github.com/mapbox/mapbox-gl-native/pull/4874)) - The compass, user dot, and visible annotations are now accessible to VoiceOver users. ([#1496](https://github.com/mapbox/mapbox-gl-native/pull/1496)) +- Added a method to MGLMapView, `-anchorPointForGesture:`, that you can override to anchor gestures at a point other than the user location. ([#5302](https://github.com/mapbox/mapbox-gl-native/pull/5302)) - Fixed an issue (speculatively) where the tile cache could be included in iCloud backups. ([#5124](https://github.com/mapbox/mapbox-gl-native/pull/5124)) - Improved performance viewing regions with large landcover polygons when viewing a style that uses the Mapbox Streets source. ([#2444](https://github.com/mapbox/mapbox-gl-native/pull/2444)) - Fixed a memory leak when using raster resources. ([#5141](https://github.com/mapbox/mapbox-gl-native/pull/5141)) From 19c34fe1f05c6a7af1d7c0492a52454934223857 Mon Sep 17 00:00:00 2001 From: Alan Kinnaman Date: Tue, 14 Jun 2016 00:17:08 -0700 Subject: [PATCH 06/16] Suppress warning when dequeueing subclasses (#5244) When using a subclass of `MGLAnnotationView` or `MGLAnnotationImage`, the following warning occurs: `Incompatible pointer types initializing 'MyClassName *' with an expression of type 'MGLAnnotationView * _Nullable'` This change eliminates the warning and matches Apple's implementation of `UITableViewCell`. Cherry-picked from 1e41c151f6edfba69037c854a5cb7abc18bb55e7. --- platform/ios/src/MGLMapView.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 09142c409..1319228c1 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -965,7 +965,7 @@ IB_DESIGNABLE @return An annotation image object with the given identifier, or `nil` if no such object exists in the reuse queue. */ -- (nullable MGLAnnotationImage *)dequeueReusableAnnotationImageWithIdentifier:(NSString *)identifier; +- (nullable __kindof MGLAnnotationImage *)dequeueReusableAnnotationImageWithIdentifier:(NSString *)identifier; /** Returns a reusable annotation view object associated with its identifier. @@ -981,7 +981,7 @@ IB_DESIGNABLE @return An annotation view object with the given identifier, or `nil` if no such object exists in the reuse queue. */ -- (nullable MGLAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier; +- (nullable __kindof MGLAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier; #pragma mark Managing Annotation Selections From a557e1e2c9f76a9b01d2a973a9a162e14525a669 Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Tue, 14 Jun 2016 10:36:41 +0200 Subject: [PATCH 07/16] [ios] fixes #5127, #5128, #5130 added enabled and selected property to MGLAnnotationView (#5297) [ios] fixes #5127, #5128, #5130 added enabled and selected property to MGLAnnotationView --- platform/ios/app/MBXAnnotationView.m | 8 +++++++ platform/ios/src/MGLAnnotationView.h | 20 ++++++++++++++++++ platform/ios/src/MGLAnnotationView.mm | 13 ++++++++++++ platform/ios/src/MGLMapView.mm | 30 +++++++++++++++++++++++++-- platform/ios/src/MGLMapViewDelegate.h | 21 +++++++++++++++++++ 5 files changed, 90 insertions(+), 2 deletions(-) diff --git a/platform/ios/app/MBXAnnotationView.m b/platform/ios/app/MBXAnnotationView.m index 890881a31..f3afe936d 100644 --- a/platform/ios/app/MBXAnnotationView.m +++ b/platform/ios/app/MBXAnnotationView.m @@ -25,4 +25,12 @@ } } +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [super setSelected:selected animated:animated]; + + self.layer.borderColor = selected ? [UIColor blackColor].CGColor : [UIColor whiteColor].CGColor; + self.layer.borderWidth = selected ? 2.0 : 0; +} + @end diff --git a/platform/ios/src/MGLAnnotationView.h b/platform/ios/src/MGLAnnotationView.h index 5b8091e7b..acf270dfc 100644 --- a/platform/ios/src/MGLAnnotationView.h +++ b/platform/ios/src/MGLAnnotationView.h @@ -40,6 +40,26 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, assign, getter=isFlat) BOOL flat; +/** + Defaults to NO and becomes YES when the view is tapped on. + + Selecting another view will first deselect the currently selected view. + This property should not be changed directly. + */ +@property (nonatomic, assign, getter=isSelected) BOOL selected; + +/** + Subclasses may override this method in order to customize appearance. + This method should not be called directly. + */ +- (void)setSelected:(BOOL)selected animated:(BOOL)animated; + +/* + This property defaults to YES. Setting it to NO will cause the annotation view to ignore all touch events. + Subclasses may use this property to customize the appearance. + */ +@property (nonatomic, assign, getter=isEnabled) BOOL enabled; + /** Setting this property to YES will cause the annotation view to shrink as it approaches the horizon and grow as it moves away from the horizon when the associated map view is tilted. Conversely, setting this property to NO will ensure that the annotation view maintains diff --git a/platform/ios/src/MGLAnnotationView.mm b/platform/ios/src/MGLAnnotationView.mm index 31657dbf4..1a95beb23 100644 --- a/platform/ios/src/MGLAnnotationView.mm +++ b/platform/ios/src/MGLAnnotationView.mm @@ -22,6 +22,7 @@ { _reuseIdentifier = [reuseIdentifier copy]; _scalesWithViewingDistance = YES; + _enabled = YES; } return self; } @@ -37,6 +38,18 @@ self.center = self.center; } +- (void)setSelected:(BOOL)selected +{ + [self setSelected:selected animated:NO]; +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [self willChangeValueForKey:@"selected"]; + _selected = selected; + [self didChangeValueForKey:@"selected"]; +} + - (void)setCenter:(CGPoint)center { [self setCenter:center pitch:0]; diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 6549ca16e..90e018642 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -3382,17 +3382,22 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) // By default attempt to use the GL annotation image frame as the positioning rect. CGRect positioningRect = [self positioningRectForCalloutForAnnotationWithTag:annotationTag]; + MGLAnnotationView *annotationView = nil; + if (annotation != self.userLocation) { MGLAnnotationContext &annotationContext = _annotationContextsByAnnotationTag.at(annotationTag); - MGLAnnotationView *annotationView = annotationContext.annotationView; - if (annotationView) + annotationView = annotationContext.annotationView; + + if (annotationView && annotationView.enabled) { // Annotations represented by views use the view frame as the positioning rect. positioningRect = annotationView.frame; [annotationView.superview bringSubviewToFront:annotationView]; + + annotationView.selected = YES; } } @@ -3474,6 +3479,11 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) { [self.delegate mapView:self didSelectAnnotation:annotation]; } + + if (annotationView && [self.delegate respondsToSelector:@selector(mapView:didSelectAnnotationView:)]) + { + [self.delegate mapView:self didSelectAnnotationView:annotationView]; + } } - (MGLCompactCalloutView *)calloutViewForAnnotation:(id )annotation @@ -3546,6 +3556,17 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) { // dismiss popup [self.calloutViewForSelectedAnnotation dismissCalloutAnimated:animated]; + + // deselect annotation view + MGLAnnotationView *annotationView = nil; + MGLAnnotationTag annotationTag = [self annotationTagForAnnotation:annotation]; + + if (annotationTag != MGLAnnotationTagNotFound) + { + MGLAnnotationContext &annotationContext = _annotationContextsByAnnotationTag.at(annotationTag); + annotationView = annotationContext.annotationView; + annotationView.selected = NO; + } // clean up self.calloutViewForSelectedAnnotation = nil; @@ -3556,6 +3577,11 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) { [self.delegate mapView:self didDeselectAnnotation:annotation]; } + + if (annotationView && [self.delegate respondsToSelector:@selector(mapView:didDeselectAnnotationView:)]) + { + [self.delegate mapView:self didDeselectAnnotationView:annotationView]; + } } } diff --git a/platform/ios/src/MGLMapViewDelegate.h b/platform/ios/src/MGLMapViewDelegate.h index 39eb43d4c..0833b7ace 100644 --- a/platform/ios/src/MGLMapViewDelegate.h +++ b/platform/ios/src/MGLMapViewDelegate.h @@ -279,6 +279,27 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)mapView:(MGLMapView *)mapView didDeselectAnnotation:(id )annotation; + +/** + Tells the delegate that one of its annotation views was selected. + + You can use this method to track changes in the selection state of annotation views. + + @param mapView The map view containing the annotation. + @param annotationView The annotation view that was selected. + */ +- (void)mapView:(MGLMapView *)mapView didSelectAnnotationView:(MGLAnnotationView *)annotationView; + +/** + Tells the delegate that one of its annotation views was deselected. + + You can use this method to track changes in the selection state of annotation views. + + @param mapView The map view containing the annotation. + @param annotationView The annotation view that was deselected. + */ +- (void)mapView:(MGLMapView *)mapView didDeselectAnnotationView:(MGLAnnotationView *)annotationView; + @end NS_ASSUME_NONNULL_END From d564302c6d376da123f01028124b1702b13ad1ef Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Tue, 14 Jun 2016 13:12:56 +0200 Subject: [PATCH 08/16] [ios] fixes #5129 added annotation property to MGLAnnotationView (#5307) Also added a test case for MGLAnnotationView --- platform/ios/ios.xcodeproj/project.pbxproj | 4 ++ platform/ios/src/MGLAnnotationView.h | 9 +++ platform/ios/src/MGLAnnotationView.mm | 2 +- platform/ios/src/MGLAnnotationView_Private.h | 2 +- platform/ios/src/MGLMapView.mm | 4 ++ platform/ios/test/MGLAnnotationViewTests.m | 62 ++++++++++++++++++++ 6 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 platform/ios/test/MGLAnnotationViewTests.m diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj index cb1bd7019..ec0957a4f 100644 --- a/platform/ios/ios.xcodeproj/project.pbxproj +++ b/platform/ios/ios.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 353D23961D0B0DFE002BE09D /* MGLAnnotationViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 353D23951D0B0DFE002BE09D /* MGLAnnotationViewTests.m */; }; 4018B1C71CDC287F00F666AF /* MGLAnnotationView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4018B1C41CDC277F00F666AF /* MGLAnnotationView.mm */; }; 4018B1C81CDC287F00F666AF /* MGLAnnotationView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4018B1C41CDC277F00F666AF /* MGLAnnotationView.mm */; }; 4018B1C91CDC288A00F666AF /* MGLAnnotationView_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4018B1C31CDC277F00F666AF /* MGLAnnotationView_Private.h */; }; @@ -325,6 +326,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 353D23951D0B0DFE002BE09D /* MGLAnnotationViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLAnnotationViewTests.m; sourceTree = ""; }; 4018B1C31CDC277F00F666AF /* MGLAnnotationView_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLAnnotationView_Private.h; sourceTree = ""; }; 4018B1C41CDC277F00F666AF /* MGLAnnotationView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLAnnotationView.mm; sourceTree = ""; }; 4018B1C51CDC277F00F666AF /* MGLAnnotationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLAnnotationView.h; sourceTree = ""; }; @@ -653,6 +655,7 @@ DA2E885D1CC0382C00F24E7B /* MGLOfflinePackTests.m */, DA2E885E1CC0382C00F24E7B /* MGLOfflineRegionTests.m */, DA2E885F1CC0382C00F24E7B /* MGLOfflineStorageTests.m */, + 353D23951D0B0DFE002BE09D /* MGLAnnotationViewTests.m */, DA2E88601CC0382C00F24E7B /* MGLStyleTests.mm */, DA2E88551CC036F400F24E7B /* Info.plist */, ); @@ -1351,6 +1354,7 @@ DA35A2C51CCA9F8300E826B2 /* MGLClockDirectionFormatterTests.m in Sources */, DA2E88621CC0382C00F24E7B /* MGLOfflinePackTests.m in Sources */, DA35A2AA1CCA058D00E826B2 /* MGLCoordinateFormatterTests.m in Sources */, + 353D23961D0B0DFE002BE09D /* MGLAnnotationViewTests.m in Sources */, DA0CD5901CF56F6A00A5F5A5 /* MGLFeatureTests.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/platform/ios/src/MGLAnnotationView.h b/platform/ios/src/MGLAnnotationView.h index acf270dfc..3b44432dc 100644 --- a/platform/ios/src/MGLAnnotationView.h +++ b/platform/ios/src/MGLAnnotationView.h @@ -4,6 +4,8 @@ NS_ASSUME_NONNULL_BEGIN +@protocol MGLAnnotation; + /** The MGLAnnotationView class is responsible for representing point-based annotation markers as a view. Annotation views represent an annotation object, which is an object that corresponds to the MGLAnnotation protocol. When an annotation’s coordinate point is visible on the map view, the map view delegate is asked to provide a corresponding annotation view. If an annotation view is created with a reuse identifier, the map view may recycle the view when it goes offscreen. */ @interface MGLAnnotationView : UIView @@ -15,6 +17,13 @@ NS_ASSUME_NONNULL_BEGIN */ - (instancetype)initWithReuseIdentifier:(nullable NSString *)reuseIdentifier; +/** + This property will be set to the associated annotation when the view is visible. + + When the view is queued and waiting to be reused, the value will be set to nil. + */ +@property (nonatomic, readonly, nullable) id annotation; + /** The string that identifies that this annotation view is reusable. (read-only) diff --git a/platform/ios/src/MGLAnnotationView.mm b/platform/ios/src/MGLAnnotationView.mm index 1a95beb23..04a888f5e 100644 --- a/platform/ios/src/MGLAnnotationView.mm +++ b/platform/ios/src/MGLAnnotationView.mm @@ -8,8 +8,8 @@ @interface MGLAnnotationView () -@property (nonatomic) id annotation; @property (nonatomic, readwrite, nullable) NSString *reuseIdentifier; +@property (nonatomic, readwrite, nullable) id annotation; @end diff --git a/platform/ios/src/MGLAnnotationView_Private.h b/platform/ios/src/MGLAnnotationView_Private.h index c5a65487a..d7cdea194 100644 --- a/platform/ios/src/MGLAnnotationView_Private.h +++ b/platform/ios/src/MGLAnnotationView_Private.h @@ -5,8 +5,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MGLAnnotationView (Private) -@property (nonatomic) id annotation; @property (nonatomic, readwrite, nullable) NSString *reuseIdentifier; +@property (nonatomic, readwrite, nullable) id annotation; - (void)setCenter:(CGPoint)center pitch:(CGFloat)pitch; diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 90e018642..a1a412af0 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -2866,6 +2866,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) if (annotationView) { annotationViewsForAnnotation[annotationValue] = annotationView; + annotationView.annotation = annotation; annotationView.center = [self convertCoordinate:annotation.coordinate toPointToView:self]; [newAnnotationViews addObject:annotationView]; } @@ -3083,6 +3084,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) MGLAnnotationContext &annotationContext = _annotationContextsByAnnotationTag.at(annotationTag); MGLAnnotationView *annotationView = annotationContext.annotationView; + annotationView.annotation = nil; [annotationView removeFromSuperview]; if (annotationTag == _selectedAnnotationTag) @@ -4540,6 +4542,8 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) if (!annotationView) return; + annotationView.annotation = nil; + if (annotationContext.viewReuseIdentifier) { NSMutableArray *annotationViewReuseQueue = [self annotationViewReuseQueueForIdentifier:annotationContext.viewReuseIdentifier]; diff --git a/platform/ios/test/MGLAnnotationViewTests.m b/platform/ios/test/MGLAnnotationViewTests.m new file mode 100644 index 000000000..541c43b5a --- /dev/null +++ b/platform/ios/test/MGLAnnotationViewTests.m @@ -0,0 +1,62 @@ +#import +#import + +static NSString * const MGLTestAnnotationReuseIdentifer = @"MGLTestAnnotationReuseIdentifer"; + +@interface MGLTestAnnotation : NSObject +@property (nonatomic, assign) CLLocationCoordinate2D coordinate; +@end + +@implementation MGLTestAnnotation +@end + +@interface MGLAnnotationViewTests : XCTestCase +@property (nonatomic) XCTestExpectation *expectation; +@property (nonatomic) MGLMapView *mapView; +@property (nonatomic, weak) MGLAnnotationView *annotationView; +@end + +@implementation MGLAnnotationViewTests + +- (void)setUp +{ + [super setUp]; + _mapView = [[MGLMapView alloc] initWithFrame:CGRectZero]; + _mapView.delegate = self; +} + +- (void)testAnnotationView +{ + _expectation = [self expectationWithDescription:@"annotation property"]; + + MGLTestAnnotation *annotation = [[MGLTestAnnotation alloc] init]; + [_mapView addAnnotation:annotation]; + + [self waitForExpectationsWithTimeout:1 handler:nil]; + + XCTAssert(_mapView.annotations.count == 1, @"number of annotations should be 1"); + XCTAssertNotNil(_annotationView.annotation, @"annotation property should not be nil"); + + [_mapView removeAnnotation:_annotationView.annotation]; + + XCTAssert(_mapView.annotations.count == 0, @"number of annotations should be 0"); + XCTAssertNil(_annotationView.annotation, @"annotation property should be nil"); +} + +- (MGLAnnotationView *)mapView:(MGLMapView *)mapView viewForAnnotation:(id)annotation +{ + MGLAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:MGLTestAnnotationReuseIdentifer]; + + if (!annotationView) + { + annotationView = [[MGLAnnotationView alloc] initWithReuseIdentifier:MGLTestAnnotationReuseIdentifer]; + } + + _annotationView = annotationView; + + [_expectation fulfill]; + + return annotationView; +} + +@end From 061854990ffe495910a5f0dc7c6bb5d394f772e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Mon, 13 Jun 2016 14:47:13 -0700 Subject: [PATCH 09/16] [macos] Renamed OS X SDK to macOS SDK Also renamed as many references to OS X as possible to macOS in documentation. Cherry-picked from b9702ef41a4cfdd0ab3107cfe5cec16ba3a4c230. --- .gitignore | 2 +- .ycm_extra_conf.py | 2 +- ARCHITECTURE.md | 4 +- CHANGELOG.md | 2 +- CONTRIBUTING.md | 4 +- INSTALL.md | 4 +- Makefile | 58 +++++++++--------- README.md | 6 +- bin/offline.sh | 2 +- configure | 4 ++ deps/ninja/{ninja-osx => ninja-macos} | Bin ...TRIBUTING_OSX.md => CONTRIBUTING_MACOS.md} | 2 +- platform/android/README.md | 2 +- platform/darwin/README.md | 6 +- platform/darwin/src/http_file_source.mm | 4 +- platform/ios/DEVELOPING.md | 10 +-- platform/{osx => macos}/CHANGELOG.md | 3 +- platform/{osx => macos}/DEVELOPING.md | 24 ++++---- platform/{osx => macos}/INSTALL.md | 14 ++--- platform/{osx => macos}/README.md | 10 +-- .../WorkspaceSettings.xcsettings | 0 platform/{osx => macos}/app/AppDelegate.h | 0 platform/{osx => macos}/app/AppDelegate.m | 0 .../AppIcon.appiconset/AppIcon128x128.png | Bin .../AppIcon.appiconset/AppIcon16x16.png | Bin .../AppIcon.appiconset/AppIcon256x256-1.png | Bin .../AppIcon.appiconset/AppIcon256x256.png | Bin .../AppIcon.appiconset/AppIcon32x32-1.png | Bin .../AppIcon.appiconset/AppIcon32x32.png | Bin .../AppIcon.appiconset/AppIcon512x512-1.png | Bin .../AppIcon.appiconset/AppIcon512x512.png | Bin .../AppIcon.appiconset/Contents.json | 0 .../AppIcon.appiconset/icon-1.png | Bin .../AppIcon.appiconset/icon.png | Bin .../app/Assets.xcassets/Contents.json | 0 .../app/Base.lproj/MainMenu.xib | 0 .../app/Base.lproj/MapDocument.xib | 0 platform/{osx => macos}/app/Credits.rtf | 0 .../{osx => macos}/app/DroppedPinAnnotation.h | 0 .../{osx => macos}/app/DroppedPinAnnotation.m | 0 platform/{osx => macos}/app/Info.plist | 0 .../app/LocationCoordinate2DTransformer.h | 0 .../app/LocationCoordinate2DTransformer.m | 0 platform/{osx => macos}/app/MapDocument.h | 0 platform/{osx => macos}/app/MapDocument.m | 0 .../app/OfflinePackNameValueTransformer.h | 0 .../app/OfflinePackNameValueTransformer.m | 0 .../app/TimeIntervalTransformer.h | 0 .../app/TimeIntervalTransformer.m | 0 platform/{osx => macos}/app/main.m | 0 platform/{osx => macos}/bitrise.yml | 8 +-- platform/macos/docs/doc-README.md | 9 +++ platform/{osx => macos}/docs/pod-README.md | 12 ++-- platform/{osx => macos}/jazzy.yml | 0 .../macos.xcodeproj}/project.pbxproj | 28 ++++----- .../contents.xcworkspacedata | 2 +- .../xcshareddata/xcschemes/CI.xcscheme | 22 +++---- .../xcshareddata/xcschemes/dynamic.xcscheme | 12 ++-- .../xcshareddata/xcschemes/macosapp.xcscheme} | 18 +++--- .../contents.xcworkspacedata | 4 +- .../xcdebugger/Breakpoints_v2.xcbkptlist | 0 .../xcschemes/mbgl-offline.xcscheme | 8 +-- .../xcschemes/mbgl-render.xcscheme | 8 +-- .../xcshareddata/xcschemes/test.xcscheme | 8 +-- platform/{osx => macos}/platform.gyp | 4 +- platform/{osx => macos}/screenshot.png | Bin platform/{osx => macos}/scripts/configure.sh | 0 platform/{osx => macos}/scripts/document.sh | 16 ++--- .../scripts/macostest.xcscheme} | 6 +- platform/{osx => macos}/scripts/package.sh | 12 ++-- .../sdk/Base.lproj/Localizable.strings | 0 .../sdk/Base.lproj/MGLAnnotationCallout.xib | 0 platform/{osx => macos}/sdk/Info.plist | 0 .../{osx => macos}/sdk/default_marker.pdf | Bin platform/{osx => macos}/sdk/mapbox.pdf | Bin .../{osx => macos}/src/MGLAnnotationImage.h | 0 .../{osx => macos}/src/MGLAnnotationImage.m | 0 .../src/MGLAnnotationImage_Private.h | 0 .../{osx => macos}/src/MGLAttributionButton.h | 0 .../{osx => macos}/src/MGLAttributionButton.m | 0 platform/{osx => macos}/src/MGLCompassCell.h | 0 platform/{osx => macos}/src/MGLCompassCell.m | 0 .../src/MGLMapView+IBAdditions.h | 0 .../src/MGLMapView+IBAdditions.m | 0 platform/{osx => macos}/src/MGLMapView.h | 0 platform/{osx => macos}/src/MGLMapView.mm | 6 +- .../{osx => macos}/src/MGLMapViewDelegate.h | 0 .../{osx => macos}/src/MGLMapView_Private.h | 0 platform/{osx => macos}/src/MGLOpenGLLayer.h | 0 platform/{osx => macos}/src/MGLOpenGLLayer.mm | 0 platform/{osx => macos}/src/Mapbox.h | 0 platform/{osx => macos}/test/Info.plist | 0 platform/node/README.md | 2 +- platform/node/bitrise.yml | 4 +- platform/osx/docs/doc-README.md | 9 --- platform/qt/README.md | 6 +- platform/qt/bitrise-qt4.yml | 4 +- platform/qt/bitrise-qt5.yml | 4 +- scripts/collect-coverage.sh | 2 +- 99 files changed, 191 insertions(+), 186 deletions(-) rename deps/ninja/{ninja-osx => ninja-macos} (100%) rename platform/android/{CONTRIBUTING_OSX.md => CONTRIBUTING_MACOS.md} (98%) rename platform/{osx => macos}/CHANGELOG.md (94%) rename platform/{osx => macos}/DEVELOPING.md (70%) rename platform/{osx => macos}/INSTALL.md (72%) rename platform/{osx => macos}/README.md (55%) rename platform/{osx => macos}/WorkspaceSettings.xcsettings (100%) rename platform/{osx => macos}/app/AppDelegate.h (100%) rename platform/{osx => macos}/app/AppDelegate.m (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/AppIcon128x128.png (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/AppIcon16x16.png (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/AppIcon256x256-1.png (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/AppIcon256x256.png (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/AppIcon32x32-1.png (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/AppIcon32x32.png (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/AppIcon512x512-1.png (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/AppIcon512x512.png (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/icon-1.png (100%) rename platform/{osx => macos}/app/Assets.xcassets/AppIcon.appiconset/icon.png (100%) rename platform/{osx => macos}/app/Assets.xcassets/Contents.json (100%) rename platform/{osx => macos}/app/Base.lproj/MainMenu.xib (100%) rename platform/{osx => macos}/app/Base.lproj/MapDocument.xib (100%) rename platform/{osx => macos}/app/Credits.rtf (100%) rename platform/{osx => macos}/app/DroppedPinAnnotation.h (100%) rename platform/{osx => macos}/app/DroppedPinAnnotation.m (100%) rename platform/{osx => macos}/app/Info.plist (100%) rename platform/{osx => macos}/app/LocationCoordinate2DTransformer.h (100%) rename platform/{osx => macos}/app/LocationCoordinate2DTransformer.m (100%) rename platform/{osx => macos}/app/MapDocument.h (100%) rename platform/{osx => macos}/app/MapDocument.m (100%) rename platform/{osx => macos}/app/OfflinePackNameValueTransformer.h (100%) rename platform/{osx => macos}/app/OfflinePackNameValueTransformer.m (100%) rename platform/{osx => macos}/app/TimeIntervalTransformer.h (100%) rename platform/{osx => macos}/app/TimeIntervalTransformer.m (100%) rename platform/{osx => macos}/app/main.m (100%) rename platform/{osx => macos}/bitrise.yml (93%) create mode 100644 platform/macos/docs/doc-README.md rename platform/{osx => macos}/docs/pod-README.md (59%) rename platform/{osx => macos}/jazzy.yml (100%) rename platform/{osx/osx.xcodeproj => macos/macos.xcodeproj}/project.pbxproj (98%) rename platform/{osx/osx.xcodeproj => macos/macos.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (87%) rename platform/{osx/osx.xcodeproj => macos/macos.xcodeproj}/xcshareddata/xcschemes/CI.xcscheme (86%) rename platform/{osx/osx.xcodeproj => macos/macos.xcodeproj}/xcshareddata/xcschemes/dynamic.xcscheme (90%) rename platform/{osx/osx.xcodeproj/xcshareddata/xcschemes/osxapp.xcscheme => macos/macos.xcodeproj/xcshareddata/xcschemes/macosapp.xcscheme} (87%) rename platform/{osx/osx.xcworkspace => macos/macos.xcworkspace}/contents.xcworkspacedata (52%) rename platform/{osx/osx.xcworkspace => macos/macos.xcworkspace}/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist (100%) rename platform/{osx/osx.xcworkspace => macos/macos.xcworkspace}/xcshareddata/xcschemes/mbgl-offline.xcscheme (88%) rename platform/{osx/osx.xcworkspace => macos/macos.xcworkspace}/xcshareddata/xcschemes/mbgl-render.xcscheme (88%) rename platform/{osx/osx.xcworkspace => macos/macos.xcworkspace}/xcshareddata/xcschemes/test.xcscheme (88%) rename platform/{osx => macos}/platform.gyp (96%) rename platform/{osx => macos}/screenshot.png (100%) rename platform/{osx => macos}/scripts/configure.sh (100%) rename platform/{osx => macos}/scripts/document.sh (67%) rename platform/{osx/scripts/osxtest.xcscheme => macos/scripts/macostest.xcscheme} (89%) rename platform/{osx => macos}/scripts/package.sh (82%) rename platform/{osx => macos}/sdk/Base.lproj/Localizable.strings (100%) rename platform/{osx => macos}/sdk/Base.lproj/MGLAnnotationCallout.xib (100%) rename platform/{osx => macos}/sdk/Info.plist (100%) rename platform/{osx => macos}/sdk/default_marker.pdf (100%) rename platform/{osx => macos}/sdk/mapbox.pdf (100%) rename platform/{osx => macos}/src/MGLAnnotationImage.h (100%) rename platform/{osx => macos}/src/MGLAnnotationImage.m (100%) rename platform/{osx => macos}/src/MGLAnnotationImage_Private.h (100%) rename platform/{osx => macos}/src/MGLAttributionButton.h (100%) rename platform/{osx => macos}/src/MGLAttributionButton.m (100%) rename platform/{osx => macos}/src/MGLCompassCell.h (100%) rename platform/{osx => macos}/src/MGLCompassCell.m (100%) rename platform/{osx => macos}/src/MGLMapView+IBAdditions.h (100%) rename platform/{osx => macos}/src/MGLMapView+IBAdditions.m (100%) rename platform/{osx => macos}/src/MGLMapView.h (100%) rename platform/{osx => macos}/src/MGLMapView.mm (99%) rename platform/{osx => macos}/src/MGLMapViewDelegate.h (100%) rename platform/{osx => macos}/src/MGLMapView_Private.h (100%) rename platform/{osx => macos}/src/MGLOpenGLLayer.h (100%) rename platform/{osx => macos}/src/MGLOpenGLLayer.mm (100%) rename platform/{osx => macos}/src/Mapbox.h (100%) rename platform/{osx => macos}/test/Info.plist (100%) delete mode 100644 platform/osx/docs/doc-README.md diff --git a/.gitignore b/.gitignore index 09216b63e..16fd24510 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,4 @@ xcuserdata /platform/ios/benchmark/assets/glyphs/DIN* /platform/ios/benchmark/assets/tiles/mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v6 **/token -/platform/osx/osx.xcworkspace/xcshareddata/osx.xcscmblueprint +/platform/macos/macos.xcworkspace/xcshareddata/macos.xcscmblueprint diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py index 632686f3d..f9b40af23 100644 --- a/.ycm_extra_conf.py +++ b/.ycm_extra_conf.py @@ -37,7 +37,7 @@ import ycm_core compilation_database_folders = [ 'build/linux-x86_64/Release', - 'build/osx/Release', + 'build/macos/Release', ] subprocess.call(['make compdb'], shell=True) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index a4405e6ba..590ea9772 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -2,7 +2,7 @@ This document aims to outline at a high level the various parts that make up map # Repository structure -mapbox-gl-native uses a monolithic that houses both core C++ code and code that wraps the C++ core with SDKs for Android, iOS, OS X, Node.js, and Qt. A "monorepo" allows us to: +mapbox-gl-native uses a monolithic that houses both core C++ code and code that wraps the C++ core with SDKs for Android, iOS, macOS, Node.js, and Qt. A "monorepo" allows us to: * Make changes to the core API and SDKs simultaneously, ensuring no platform falls behind. * Ensure that core changes do not inadvertently break SDK tests. @@ -42,7 +42,7 @@ We track mason dependencies for a given platform in the file `platform/