From 2dae2254dd2a4e9ac4dbf0517ec758b2e2fcccb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Mon, 16 Jan 2017 21:50:08 -0800 Subject: [PATCH 01/26] [macos] Check for implementation before calling -toolTip Also fixed a couple typos in changelogs. --- platform/ios/CHANGELOG.md | 4 ++-- platform/macos/CHANGELOG.md | 3 ++- platform/macos/src/MGLMapView.mm | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 0d11a923a..0e28bf153 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -49,7 +49,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT ### Annotations * Added new methods to MGLMultiPoint for changing the vertices along a polyline annotation or the exterior of a polygon annotation. ([#6565](https://github.com/mapbox/mapbox-gl-native/pull/6565)) -* Added new APIs to MGLMapView to query for visible annotations. Combined with `-[MGLMapView viewForAnnotation:]`, these APIs can be used to access all visible annotation views. ([6061](https://github.com/mapbox/mapbox-gl-native/pull/6061)) +* Added new APIs to MGLMapView to query for visible annotations. Combined with `-[MGLMapView viewForAnnotation:]`, these APIs can be used to access all visible annotation views. ([#6061](https://github.com/mapbox/mapbox-gl-native/pull/6061)) * Shape, feature, and annotation classes now conform to NSSecureCoding. ([#6559](https://github.com/mapbox/mapbox-gl-native/pull/6559)) * Fixed an issue causing offscreen annotation views to be updated even when they were in the reuse queue. ([#5987](https://github.com/mapbox/mapbox-gl-native/pull/5987)) * Fixed an issue preventing MGLAnnotationView from animating when its coordinate changes. ([#6215](https://github.com/mapbox/mapbox-gl-native/pull/6215)) @@ -253,7 +253,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT - Heading or course tracking mode can now be enabled as soon as an MGLMapView is initialized. ([#3680](https://github.com/mapbox/mapbox-gl-native/pull/3680)) - Zooming and rotation gestures no longer disable user tracking mode. ([#3589](https://github.com/mapbox/mapbox-gl-native/pull/3589)) - User tracking mode starts out at a lower zoom level by default. ([#3589](https://github.com/mapbox/mapbox-gl-native/pull/3589)) -- Fixed an issue with small map views not properly fitting annotations within bounds. (#[3407](https://github.com/mapbox/mapbox-gl-native/pull/3407)) +- Fixed an issue with small map views not properly fitting annotations within bounds. ([#3407](https://github.com/mapbox/mapbox-gl-native/pull/3407)) - When the user rotates the map to within 7° of true north, the map view now snaps to true north. ([#3403](https://github.com/mapbox/mapbox-gl-native/pull/3403)) - The map view’s background can now be transparent or translucent, as long as the style’s background layer is transparent or translucent and `MGLMapView.opaque` is set to `NO`. ([#3096](https://github.com/mapbox/mapbox-gl-native/pull/3096)) - Documentation is now generated by [jazzy](https://github.com/realm/jazzy) instead of appledoc. ♪♫ ([#3203](https://github.com/mapbox/mapbox-gl-native/pull/3203)) diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index bc15b4667..d2f5d1cca 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -37,7 +37,8 @@ This version of the Mapbox macOS SDK corresponds to version 3.4.0 of the Mapbox * Added `showAnnotations:animated:` and `showAnnotations:edgePadding:animated:`, which moves the map viewport to show the specified annotations. ([#5749](https://github.com/mapbox/mapbox-gl-native/pull/5749)) * Added new methods to MGLMultiPoint for changing the vertices along a polyline annotation or the exterior of a polygon annotation. ([#6565](https://github.com/mapbox/mapbox-gl-native/pull/6565)) -* Added new APIs to MGLMapView to query for visible annotations. ([6061](https://github.com/mapbox/mapbox-gl-native/pull/6061)) +* Fixed an exception raised when adding a custom annotation model object to MGLMapView. ([#7746](https://github.com/mapbox/mapbox-gl-native/pull/7746)) +* Added new APIs to MGLMapView to query for visible annotations. ([#6061](https://github.com/mapbox/mapbox-gl-native/pull/6061)) * Shape, feature, and annotation classes now conform to NSSecureCoding. ([#6559](https://github.com/mapbox/mapbox-gl-native/pull/6559)) * Various method arguments that are represented as C arrays of `CLLocationCoordinate2D` instances have been marked `const` to streamline bridging to Swift. ([#7215](https://github.com/mapbox/mapbox-gl-native/pull/7215)) * To make an MGLPolyline or MGLPolygon span the antimeridian, specify coordinates with longitudes greater than 180° or less than −180°. ([#6088](https://github.com/mapbox/mapbox-gl-native/pull/6088)) diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 7bd8f3369..00fb5e3b2 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1820,7 +1820,7 @@ public: } // Opt into potentially expensive tooltip tracking areas. - if (annotation.toolTip.length) { + if ([annotation respondsToSelector:@selector(toolTip)] && annotation.toolTip.length) { _wantsToolTipRects = YES; } } @@ -2355,7 +2355,7 @@ public: for (MGLAnnotationTag annotationTag : annotationTags) { MGLAnnotationImage *annotationImage = [self imageOfAnnotationWithTag:annotationTag]; id annotation = [self annotationWithTag:annotationTag]; - if (annotation.toolTip.length) { + if ([annotation respondsToSelector:@selector(toolTip)] && annotation.toolTip.length) { // Add a tooltip tracking area over the annotation image’s // frame, accounting for the image’s alignment rect. NSImage *image = annotationImage.image; From d829570cca4e2df98902236cb6d3e62dabddf487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 17 Jan 2017 12:51:02 -0800 Subject: [PATCH 02/26] ios-v3.4.0-rc.1 --- platform/ios/Mapbox-iOS-SDK-symbols.podspec | 2 +- platform/ios/Mapbox-iOS-SDK.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/ios/Mapbox-iOS-SDK-symbols.podspec b/platform/ios/Mapbox-iOS-SDK-symbols.podspec index 1098c5cd1..66d457e36 100644 --- a/platform/ios/Mapbox-iOS-SDK-symbols.podspec +++ b/platform/ios/Mapbox-iOS-SDK-symbols.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '3.4.0-beta.7' + version = '3.4.0-rc.1' m.name = 'Mapbox-iOS-SDK-symbols' m.version = "#{version}-symbols" diff --git a/platform/ios/Mapbox-iOS-SDK.podspec b/platform/ios/Mapbox-iOS-SDK.podspec index cf3f3afa6..db82e0750 100644 --- a/platform/ios/Mapbox-iOS-SDK.podspec +++ b/platform/ios/Mapbox-iOS-SDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '3.4.0-beta.7' + version = '3.4.0-rc.1' m.name = 'Mapbox-iOS-SDK' m.version = version From e38216d25444fd426921c372898c425d6030355e Mon Sep 17 00:00:00 2001 From: Jordan Kiley Date: Tue, 17 Jan 2017 20:54:36 -0800 Subject: [PATCH 03/26] Typo fixes, added line to MGLStyleLayer initializer description (#7759) * Typo fixes in MGLMapCamera.h and MGLMapView.h * Added line to MGLStyleLayer initializer description * Edited line in MGLShapeCollection.h --- platform/darwin/src/MGLMapCamera.h | 2 +- platform/darwin/src/MGLShapeCollection.h | 4 ++-- platform/darwin/src/MGLStyleLayer.h | 7 ++++++- platform/ios/src/MGLMapView.h | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/platform/darwin/src/MGLMapCamera.h b/platform/darwin/src/MGLMapCamera.h index f6bff3628..abb43d9ae 100644 --- a/platform/darwin/src/MGLMapCamera.h +++ b/platform/darwin/src/MGLMapCamera.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN + (instancetype)camera; /** - Returns a new camera using based on information about the camera’s viewpoint + Returns a new camera based on information about the camera’s viewpoint and focus point. @param centerCoordinate The geographic coordinate on which the map should be diff --git a/platform/darwin/src/MGLShapeCollection.h b/platform/darwin/src/MGLShapeCollection.h index 01aece824..b0f3e964d 100644 --- a/platform/darwin/src/MGLShapeCollection.h +++ b/platform/darwin/src/MGLShapeCollection.h @@ -28,8 +28,8 @@ NS_ASSUME_NONNULL_BEGIN convenient to use an `MGLPointCollection`, `MGLMultiPolyline`, or `MGLMultiPolygon` object, respectively. - A multipolyline is known as a - GeometryCollection + A shape collection is known as a + GeometryCollection geometry in GeoJSON. */ @interface MGLShapeCollection : MGLShape diff --git a/platform/darwin/src/MGLStyleLayer.h b/platform/darwin/src/MGLStyleLayer.h index 4032be929..a91ac11c2 100644 --- a/platform/darwin/src/MGLStyleLayer.h +++ b/platform/darwin/src/MGLStyleLayer.h @@ -27,9 +27,14 @@ NS_ASSUME_NONNULL_BEGIN /** Returns a style layer object initialized with the given identifier. + The default implementation of this initializer in MGLStyleLayer creates an + invalid style layer. Call this initializer on `MGLBackgroundStyleLayer` or one of + the concrete subclasses of `MGLForegroundStyleLayer` to create a valid style + layer. + After initializing and configuring the style layer, add it to a map view’s style using the `-[MGLStyle addLayer:]` or - `-[MGLStyle insertLayer:belowLayer:]` method. + `-[MGLStyle insertLayer:belowLayer:]` method. @param identifier A string that uniquely identifies the layer in the style to which it is added. diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 62f053e96..715f3338c 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -28,7 +28,7 @@ extern const CGFloat MGLMapViewDecelerationRateNormal; /** A fast deceleration rate for a map view. */ extern const CGFloat MGLMapViewDecelerationRateFast; -/** Disables decleration in a map view. */ +/** Disables deceleration in a map view. */ extern const CGFloat MGLMapViewDecelerationRateImmediate; /** From 344cd173ea96b2812549b980d1ab725c0aae57f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Tue, 17 Jan 2017 22:12:52 -0800 Subject: [PATCH 04/26] [macos] Avoid nilling out style URL on load -awakeFromNib nils out the styleURL property to ensure a style is always present on load. However, if the style URL is specified in the Style URL inspectable, it is set somewhere between -initWithCoder: and -awakeFromNib; nilling out the styleURL property in -awakeFromNib thus resets the style to the default. This change guards against nilling out a non-nil style URL, ensuring that -setStyleURL: is called once and only once on launch. --- platform/macos/src/MGLMapView.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 00fb5e3b2..3deb7db57 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -231,7 +231,11 @@ public: - (void)awakeFromNib { [super awakeFromNib]; - self.styleURL = nil; + // If the Style URL inspectable was not set, make sure to go through + // -setStyleURL: to load the default style. + if (_mbglMap->getStyleURL().empty()) { + self.styleURL = nil; + } } + (NSArray *)restorableStateKeyPaths { From f67a2b0954d4102353fe173c794e17723d519965 Mon Sep 17 00:00:00 2001 From: Tobrun Date: Sun, 15 Jan 2017 21:11:42 +0100 Subject: [PATCH 05/26] [android] - update build tools to bitrise supported version (#7729) Cherry-picked from 9a635672a6251f05b864efc71214046f9ea4acff. --- platform/android/MapboxGLAndroidSDK/gradle.properties | 6 +++--- platform/android/MapboxGLAndroidSDKTestApp/build.gradle | 4 ++-- platform/android/MapboxGLAndroidSDKWearTestApp/build.gradle | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/platform/android/MapboxGLAndroidSDK/gradle.properties b/platform/android/MapboxGLAndroidSDK/gradle.properties index 6aab98529..e5326721b 100644 --- a/platform/android/MapboxGLAndroidSDK/gradle.properties +++ b/platform/android/MapboxGLAndroidSDK/gradle.properties @@ -13,9 +13,9 @@ POM_DEVELOPER_ID=mapbox POM_DEVELOPER_NAME=Mapbox ANDROID_MIN_SDK=15 -ANDROID_BUILD_TARGET_SDK_VERSION=23 -ANDROID_BUILD_TOOLS_VERSION=23.0.3 -ANDROID_BUILD_SDK_VERSION=23 +ANDROID_BUILD_TARGET_SDK_VERSION=25 +ANDROID_BUILD_TOOLS_VERSION=25.0.2 +ANDROID_BUILD_SDK_VERSION=25 POM_NAME=Mapbox Android SDK POM_ARTIFACT_ID=mapbox-android-sdk diff --git a/platform/android/MapboxGLAndroidSDKTestApp/build.gradle b/platform/android/MapboxGLAndroidSDKTestApp/build.gradle index f5f4ec3f5..0c32311ce 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/build.gradle +++ b/platform/android/MapboxGLAndroidSDKTestApp/build.gradle @@ -27,8 +27,8 @@ ext { } android { - compileSdkVersion 23 - buildToolsVersion "23.0.3" + compileSdkVersion 25 + buildToolsVersion "25.0.2" defaultConfig { applicationId "com.mapbox.mapboxsdk.testapp" diff --git a/platform/android/MapboxGLAndroidSDKWearTestApp/build.gradle b/platform/android/MapboxGLAndroidSDKWearTestApp/build.gradle index 6bd1fac32..9f089e584 100644 --- a/platform/android/MapboxGLAndroidSDKWearTestApp/build.gradle +++ b/platform/android/MapboxGLAndroidSDKWearTestApp/build.gradle @@ -20,8 +20,8 @@ gradle.projectsEvaluated { } android { - compileSdkVersion 24 - buildToolsVersion "24.0.2" + compileSdkVersion 25 + buildToolsVersion "25.0.2" defaultConfig { applicationId "com.mapbox.mapboxsdk.testapp" From 4cff0977a04a0fb17e2a95ea773d9ca3222a5b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Fri, 20 Jan 2017 14:08:38 -0800 Subject: [PATCH 06/26] ios-v3.4.0 --- platform/ios/Mapbox-iOS-SDK-symbols.podspec | 2 +- platform/ios/Mapbox-iOS-SDK.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/ios/Mapbox-iOS-SDK-symbols.podspec b/platform/ios/Mapbox-iOS-SDK-symbols.podspec index 66d457e36..b1c60ca9d 100644 --- a/platform/ios/Mapbox-iOS-SDK-symbols.podspec +++ b/platform/ios/Mapbox-iOS-SDK-symbols.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '3.4.0-rc.1' + version = '3.4.0' m.name = 'Mapbox-iOS-SDK-symbols' m.version = "#{version}-symbols" diff --git a/platform/ios/Mapbox-iOS-SDK.podspec b/platform/ios/Mapbox-iOS-SDK.podspec index db82e0750..e815eb69a 100644 --- a/platform/ios/Mapbox-iOS-SDK.podspec +++ b/platform/ios/Mapbox-iOS-SDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '3.4.0-rc.1' + version = '3.4.0' m.name = 'Mapbox-iOS-SDK' m.version = version From 5fd740729ecfe63fb0717acfd6f1fec07876e6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Fri, 20 Jan 2017 22:43:04 -0800 Subject: [PATCH 07/26] [macos] Reorganized readmes Made the download link easier to find in the installation instructions. Reorganized readmes to link to more related resources. Shout out to OpenStreetMap. --- platform/macos/INSTALL.md | 8 ++++---- platform/macos/README.md | 18 ++++++++++++------ platform/macos/docs/pod-README.md | 6 +++--- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/platform/macos/INSTALL.md b/platform/macos/INSTALL.md index f8b4c675d..ef04267c4 100644 --- a/platform/macos/INSTALL.md +++ b/platform/macos/INSTALL.md @@ -1,14 +1,14 @@ -# Integrating the Mapbox macOS SDK into your application +# Integrating a custom build of the Mapbox macOS SDK into your application -This document explains how to build the Mapbox macOS SDK and integrate it into your own Cocoa application. +This document explains how to build a development version of the Mapbox macOS SDK from source and integrate it into your own Cocoa application. This process is for advanced developers who want to get a glimpse of the SDK’s development between releases. To use a production-ready version of the SDK, see the [Mapbox macOS SDK homepage](https://mapbox.github.io/mapbox-gl-native/macos/). ### Requirements The Mapbox macOS SDK requires the macOS 10.10.0 SDK (or above) and Xcode 7.3 (or above). -### Building the SDK +### Building the SDK from source -Grab a [prebuilt release](https://github.com/mapbox/mapbox-gl-native/releases/) – look for the releases that begin with “macos-” – or build the SDK from source: +To build the SDK from source: 1. [Install core dependencies](../../INSTALL.md). diff --git a/platform/macos/README.md b/platform/macos/README.md index aea5ba0d6..14b3e0cf1 100644 --- a/platform/macos/README.md +++ b/platform/macos/README.md @@ -1,10 +1,10 @@ -# Mapbox macOS SDK +# [Mapbox macOS SDK](https://mapbox.github.io/mapbox-gl-native/macos/) [![Bitrise](https://www.bitrise.io/app/155ef7da24b38dcd.svg?token=4KSOw_gd6WxTnvGE2rMttg&branch=master)](https://www.bitrise.io/app/155ef7da24b38dcd) Put interactive, scalable world maps into your native Cocoa application with the Mapbox macOS SDK. -* Mapbox-curated [map styles](https://www.mapbox.com/maps/) and [vector tiles](https://www.mapbox.com/vector-tiles/) make it easy to get started. +* Mapbox-curated [map styles](https://www.mapbox.com/maps/) and [OpenStreetMap-based](https://www.mapbox.com/vector-tiles/mapbox-streets-v7/) [vector tiles](https://www.mapbox.com/vector-tiles/) make it easy to get started. * Customize every aspect of the map’s appearance in code or visually using [Mapbox Studio](https://www.mapbox.com/mapbox-studio/). * High-performance OpenGL rendering and multitouch gestures keep your users happy. * A well-designed, fully documented API helps you stay productive. @@ -14,11 +14,17 @@ Put interactive, scalable world maps into your native Cocoa application with the The Mapbox macOS SDK is compatible with macOS 10.10.0 and above for Cocoa applications developed in Objective-C, Swift, Interface Builder, or AppleScript. For hybrid applications, consider [Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js/). -* [Integrate the Mapbox macOS SDK into your application](INSTALL.md) +Information for Mac developers: + +* [Integrate the Mapbox macOS SDK into your application](https://mapbox.github.io/mapbox-gl-native/macos/) +* [Learn how to use the Mapbox macOS SDK](https://mapbox.github.io/mapbox-gl-native/macos/) +* [Browse example styles designed in Mapbox Studio](https://www.mapbox.com/gallery/) + +Information for contributors: + +* [Build the Mapbox macOS SDK from source](INSTALL.md) * [Contribute to the Mapbox macOS SDK](DEVELOPING.md) -* [Mapbox macOS SDK reference documentation](https://mapbox.github.io/mapbox-gl-native/macos/) -* [See example styles designed in Mapbox Studio](https://www.mapbox.com/gallery/) -* [Hand-authoring a macOS SDK–compatible style](https://www.mapbox.com/mapbox-gl-style-spec/) +* [Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/) * [Mapbox Vector Tile Specification](https://www.mapbox.com/developers/vector-tiles/) Mapbox does not officially support the Mapbox macOS SDK to the same extent as the Mapbox iOS SDK; however, bug reports and pull requests are certainly welcome. diff --git a/platform/macos/docs/pod-README.md b/platform/macos/docs/pod-README.md index 6d45a68c3..33386340c 100644 --- a/platform/macos/docs/pod-README.md +++ b/platform/macos/docs/pod-README.md @@ -2,7 +2,7 @@ Put interactive, scalable world maps into your native Cocoa application with the open-source Mapbox macOS SDK. -* Mapbox-curated [map styles](https://www.mapbox.com/maps/) and [vector tiles](https://www.mapbox.com/vector-tiles/) make it easy to get started. +* Mapbox-curated [map styles](https://www.mapbox.com/maps/) and [OpenStreetMap-based](https://www.mapbox.com/vector-tiles/mapbox-streets-v7/) [vector tiles](https://www.mapbox.com/vector-tiles/) make it easy to get started. * Customize every aspect of the map’s appearance in code or visually using [Mapbox Studio](https://www.mapbox.com/mapbox-studio/). * High-performance OpenGL rendering and multitouch gestures keep your users happy. * A well-designed, fully documented API helps you stay productive. @@ -12,10 +12,10 @@ Put interactive, scalable world maps into your native Cocoa application with the The Mapbox macOS SDK is compatible with macOS 10.10.0 and above for Cocoa applications developed in Objective-C, Swift, Interface Builder, or AppleScript. For hybrid applications, consider [Mapbox GL JS](https://www.mapbox.com/mapbox-gl-js/). -Mapbox macOS SDK releases are [available on GitHub](https://github.com/mapbox/mapbox-gl-native/releases/) – look for the releases that begin with “macos-”. You can also integrate the Mapbox macOS SDK into your application using CocoaPods. - ## Installation +1. Download the [latest Mapbox macOS SDK release](https://github.com/mapbox/mapbox-gl-native/releases/) from GitHub – look for a release that begins with “macos-”. (Alternatively, you can integrate the Mapbox macOS SDK into your application [using CocoaPods](https://cocoapods.org/pods/Mapbox-macOS-SDK). If you do use CocoaPods, skip the next step.) + 1. Open the project editor, select your application target, then go to the General tab. Drag Mapbox.framework into the “Embedded Binaries” section. (Don’t drag it into the “Linked Frameworks and Libraries” section; Xcode will add it there automatically.) In the sheet that appears, make sure “Copy items if needed” is checked, then click Finish. 1. Mapbox vector tiles require a Mapbox account and API access token. In the project editor, select the application target, then go to the Info tab. Under the “Custom macOS Application Target Properties” section, set `MGLMapboxAccessToken` to your access token. You can obtain an access token from the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). From 714127eb50ccb603b41eceeb66d0e7cf15ad1c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Fri, 20 Jan 2017 22:43:57 -0800 Subject: [PATCH 08/26] macos-v0.3.0 --- platform/macos/Mapbox-macOS-SDK-symbols.podspec | 2 +- platform/macos/Mapbox-macOS-SDK.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/macos/Mapbox-macOS-SDK-symbols.podspec b/platform/macos/Mapbox-macOS-SDK-symbols.podspec index 6de7f829a..0a0875ccb 100644 --- a/platform/macos/Mapbox-macOS-SDK-symbols.podspec +++ b/platform/macos/Mapbox-macOS-SDK-symbols.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '0.3.0-rc.1' + version = '0.3.0' m.name = 'Mapbox-macOS-SDK-symbols' m.version = "#{version}-symbols" diff --git a/platform/macos/Mapbox-macOS-SDK.podspec b/platform/macos/Mapbox-macOS-SDK.podspec index 03ef0eabe..029ab4b3e 100644 --- a/platform/macos/Mapbox-macOS-SDK.podspec +++ b/platform/macos/Mapbox-macOS-SDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '0.3.0-rc.1' + version = '0.3.0' m.name = 'Mapbox-macOS-SDK' m.version = version From 0c95fcfd0606df7c34abcb5770c77bfe4e086e80 Mon Sep 17 00:00:00 2001 From: nitrag Date: Mon, 23 Jan 2017 16:17:15 -0500 Subject: [PATCH 09/26] [ios, macos] Document how to avoid gesture recognizer conflicts (#7816) * Expand on Gesture Implementation Adding Gesture info as discussed: https://github.com/mapbox/mapbox-gl-native/issues/2278#issuecomment-273685832 Not sure if using codeblocks is kosher. * Update styling and verbiage * More updates * [ios] -requireGestureRecognizerToFail: seems to be enough * [macos] Added corresponding macOS documentation --- platform/ios/src/MGLMapView.h | 14 ++++++++++++++ platform/macos/src/MGLMapView.h | 15 +++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 715f3338c..0d65ea2fb 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -73,8 +73,22 @@ typedef NS_ENUM(NSUInteger, MGLAnnotationVerticalAlignment) { your Mapbox account. They also deter other developers from using your styles without your permission. + Adding your own gesture recognizer to `MGLMapView` will block the corresponding + gesture recognizer built into `MGLMapView`. To avoid conflicts, define which + gesture takes precedence. For example, you can create your own + `UITapGestureRecognizer` that will be invoked only if the default `MGLMapView` + tap gesture fails: + + ```swift + let mapTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(myCustomFunction)) + for recognizer in mapView.gestureRecognizers! where recognizer is UITapGestureRecognizer { + mapTapGestureRecognizer.require(toFail: recognizer) + } + ``` + @note You are responsible for getting permission to use the map data and for ensuring that your use adheres to the relevant terms of use. + */ IB_DESIGNABLE @interface MGLMapView : UIView diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h index 954e5a2c7..5f34976ca 100644 --- a/platform/macos/src/MGLMapView.h +++ b/platform/macos/src/MGLMapView.h @@ -44,6 +44,21 @@ NS_ASSUME_NONNULL_BEGIN your Mapbox account. They also deter other developers from using your styles without your permission. + Adding your own gesture recognizer to `MGLMapView` will block the corresponding + gesture recognizer built into `MGLMapView`. To avoid conflicts, define which + gesture recognizer takes precedence. For example, you can subclass + `NSClickGestureRecognizer` and override `-[NSGestureRecognizer shouldRequireFailureOfGestureRecognizer:]`, + so that your subclass will be invoked only if the default `MGLMapView` click + gesture recognizer fails: + + ```swift + class MapClickGestureRecognizer: NSClickGestureRecognizer { + override func shouldRequireFailure(of otherGestureRecognizer: NSGestureRecognizer) -> Bool { + return otherGestureRecognizer is NSClickGestureRecognizer + } + } + ``` + @note You are responsible for getting permission to use the map data and for ensuring that your use adheres to the relevant terms of use. */ From 5a2bb8d2409b0edf53c514dd5da02e34705d67fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sat, 21 Jan 2017 15:17:01 -0800 Subject: [PATCH 10/26] [ios, macos] Note that canvas sources are unsupported --- platform/darwin/docs/guides/For Style Authors.md.ejs | 2 +- platform/ios/docs/guides/For Style Authors.md | 2 +- platform/macos/docs/guides/For Style Authors.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs index 3d775c8a8..d1cbfff4f 100644 --- a/platform/darwin/docs/guides/For Style Authors.md.ejs +++ b/platform/darwin/docs/guides/For Style Authors.md.ejs @@ -178,7 +178,7 @@ In style JSON | In the SDK `raster` | `MGLRasterSource` `vector` | `MGLVectorSource` -`image` and `video` sources are not supported. +`canvas`, `image`, and `video` sources are not supported. ### Tile sources diff --git a/platform/ios/docs/guides/For Style Authors.md b/platform/ios/docs/guides/For Style Authors.md index 753eb7200..f487f7eb0 100644 --- a/platform/ios/docs/guides/For Style Authors.md +++ b/platform/ios/docs/guides/For Style Authors.md @@ -127,7 +127,7 @@ In style JSON | In the SDK `raster` | `MGLRasterSource` `vector` | `MGLVectorSource` -`image` and `video` sources are not supported. +`canvas`, `image`, and `video` sources are not supported. ### Tile sources diff --git a/platform/macos/docs/guides/For Style Authors.md b/platform/macos/docs/guides/For Style Authors.md index cf25ae09c..2e102f48e 100644 --- a/platform/macos/docs/guides/For Style Authors.md +++ b/platform/macos/docs/guides/For Style Authors.md @@ -115,7 +115,7 @@ In style JSON | In the SDK `raster` | `MGLRasterSource` `vector` | `MGLVectorSource` -`image` and `video` sources are not supported. +`canvas`, `image`, and `video` sources are not supported. ### Tile sources From b32c17119e5b046aab796a29e321759095a0959b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sat, 21 Jan 2017 18:22:19 -0800 Subject: [PATCH 11/26] [ios] EdgeInsets is UIEdgeInsets in Swift on iOS --- platform/darwin/docs/guides/For Style Authors.md.ejs | 12 +++++++++--- platform/ios/docs/guides/For Style Authors.md | 7 ++++--- platform/macos/docs/guides/For Style Authors.md | 7 ++++--- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs index d1cbfff4f..ee13aa113 100644 --- a/platform/darwin/docs/guides/For Style Authors.md.ejs +++ b/platform/darwin/docs/guides/For Style Authors.md.ejs @@ -282,9 +282,15 @@ Array (`-padding`) | `NSValue.edgeInsetsValue` | `NSValue.edgeInsetsValue` <% } -%> For padding attributes, note that the arguments to -`<%- cocoaPrefix %>EdgeInsetsMake()` in Objective-C and -`EdgeInsets(top:left:bottom:right:)` in Swift are specified in counterclockwise -order, in contrast to the clockwise order defined by the style specification. +<% if (iOS) { -%> +`UIEdgeInsetsMake()` in Objective-C and `UIEdgeInsets(top:left:bottom:right:)` +in Swift +<% } else { -%> +`NSEdgeInsetsMake()` in Objective-C and `EdgeInsets(top:left:bottom:right:)` in +Swift +<% } -%> +are specified in counterclockwise order, in contrast to the clockwise order +defined by the style specification. <% if (macOS) { -%> Additionally, on macOS, a screen coordinate of (0, 0) is located at the diff --git a/platform/ios/docs/guides/For Style Authors.md b/platform/ios/docs/guides/For Style Authors.md index f487f7eb0..a8b6216ae 100644 --- a/platform/ios/docs/guides/For Style Authors.md +++ b/platform/ios/docs/guides/For Style Authors.md @@ -275,9 +275,10 @@ Array (`-offset`, `-translate`) | `NSValue.CGVectorValue` | `NSValue.cgVectorVal Array (`-padding`) | `NSValue.UIEdgeInsetsValue` | `NSValue.uiEdgeInsetsValue` For padding attributes, note that the arguments to -`UIEdgeInsetsMake()` in Objective-C and -`EdgeInsets(top:left:bottom:right:)` in Swift are specified in counterclockwise -order, in contrast to the clockwise order defined by the style specification. +`UIEdgeInsetsMake()` in Objective-C and `UIEdgeInsets(top:left:bottom:right:)` +in Swift +are specified in counterclockwise order, in contrast to the clockwise order +defined by the style specification. ## Filtering sources diff --git a/platform/macos/docs/guides/For Style Authors.md b/platform/macos/docs/guides/For Style Authors.md index 2e102f48e..5c9160580 100644 --- a/platform/macos/docs/guides/For Style Authors.md +++ b/platform/macos/docs/guides/For Style Authors.md @@ -263,9 +263,10 @@ Array (`-offset`, `-translate`) | `NSValue` containing `CGVector` | `NSValue` co Array (`-padding`) | `NSValue.edgeInsetsValue` | `NSValue.edgeInsetsValue` For padding attributes, note that the arguments to -`NSEdgeInsetsMake()` in Objective-C and -`EdgeInsets(top:left:bottom:right:)` in Swift are specified in counterclockwise -order, in contrast to the clockwise order defined by the style specification. +`NSEdgeInsetsMake()` in Objective-C and `EdgeInsets(top:left:bottom:right:)` in +Swift +are specified in counterclockwise order, in contrast to the clockwise order +defined by the style specification. Additionally, on macOS, a screen coordinate of (0, 0) is located at the lower-left corner of the screen. Therefore, a positive `CGVector.dy` means an From 35e062d72cde411e8a9a36ef74cbe527d31e945b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 24 Jan 2017 08:29:46 -0800 Subject: [PATCH 12/26] [ios, macos] Wrap camera heading (#7724) * [ios, macos] Fixed negative camera heading when facing northwest * [ios] Corrected counterclockwise rotation test --- platform/ios/CHANGELOG.md | 4 ++++ platform/ios/src/MGLMapView.mm | 2 +- platform/ios/uitest/MapViewTests.m | 17 ++++++++++++++++- platform/macos/CHANGELOG.md | 6 ++++++ platform/macos/src/MGLMapView.mm | 2 +- 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 0e28bf153..6f6daf6be 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -2,6 +2,10 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. +## 3.4.1 + +* Fixed an issue causing MGLMapView’s `camera`’s `heading` to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s `direction` property. ([#7724](https://github.com/mapbox/mapbox-gl-native/pull/7724)) + ## 3.4.0 ### Packaging diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index ba40997bc..acc6a3f13 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -2625,7 +2625,7 @@ public: { CLLocationCoordinate2D centerCoordinate = MGLLocationCoordinate2DFromLatLng(cameraOptions.center ? *cameraOptions.center : _mbglMap->getLatLng()); double zoomLevel = cameraOptions.zoom ? *cameraOptions.zoom : self.zoomLevel; - CLLocationDirection direction = cameraOptions.angle ? -MGLDegreesFromRadians(*cameraOptions.angle) : self.direction; + CLLocationDirection direction = cameraOptions.angle ? mbgl::util::wrap(-MGLDegreesFromRadians(*cameraOptions.angle), 0., 360.) : self.direction; CGFloat pitch = cameraOptions.pitch ? MGLDegreesFromRadians(*cameraOptions.pitch) : _mbglMap->getPitch(); CLLocationDistance altitude = MGLAltitudeForZoomLevel(zoomLevel, pitch, centerCoordinate.latitude, self.frame.size); return [MGLMapCamera cameraLookingAtCenterCoordinate:centerCoordinate fromDistance:altitude pitch:pitch heading:direction]; diff --git a/platform/ios/uitest/MapViewTests.m b/platform/ios/uitest/MapViewTests.m index 41ea5446e..21310b47a 100644 --- a/platform/ios/uitest/MapViewTests.m +++ b/platform/ios/uitest/MapViewTests.m @@ -260,7 +260,7 @@ @"disabling pan gesture should disallow horizontal panning"); } -- (void)testRotate { +- (void)testRotateClockwise { CLLocationDirection startAngle = tester.mapView.direction; XCTAssertNotEqual(startAngle, @@ -274,6 +274,21 @@ @"rotating map should change angle"); } +- (void)testRotateCounterclockwise { + CLLocationDirection startAngle = tester.mapView.direction; + + XCTAssertNotEqual(startAngle, + -45, + @"start angle must not be destination angle"); + + [tester.mapView twoFingerRotateAtPoint:tester.mapView.center angle:-45]; + + XCTAssertGreaterThanOrEqual(fabs(startAngle - tester.mapView.direction), + 20, + @"rotating map should change angle"); + XCTAssertGreaterThan(tester.mapView.camera.heading, 0, @"camera should not go negative"); +} + - (void)testRotateDisabled { tester.mapView.rotateEnabled = NO; CLLocationDirection startAngle = tester.mapView.direction; diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index d2f5d1cca..6f5c41feb 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog for Mapbox macOS SDK +## 0.3.1 + +This version of the Mapbox macOS SDK corresponds to version 3.4.1 of the Mapbox iOS SDK. The two SDKs have very similar feature sets. The main differences are the lack of user location tracking and annotation views. Some APIs have been adapted to macOS conventions, particularly the use of NSPopover for callout views. + +* Fixed an issue causing MGLMapView’s `camera`’s `heading` to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s `direction` property. ([#7724](https://github.com/mapbox/mapbox-gl-native/pull/7724)) + ## 0.3.0 This version of the Mapbox macOS SDK corresponds to version 3.4.0 of the Mapbox iOS SDK. The two SDKs have very similar feature sets. The main differences are the lack of user location tracking and annotation views. Some APIs have been adapted to macOS conventions, particularly the use of NSPopover for callout views. diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 3deb7db57..2b0d5f4bc 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1249,7 +1249,7 @@ public: - (MGLMapCamera *)cameraForCameraOptions:(const mbgl::CameraOptions &)cameraOptions { CLLocationCoordinate2D centerCoordinate = MGLLocationCoordinate2DFromLatLng(cameraOptions.center ? *cameraOptions.center : _mbglMap->getLatLng()); double zoomLevel = cameraOptions.zoom ? *cameraOptions.zoom : self.zoomLevel; - CLLocationDirection direction = cameraOptions.angle ? -MGLDegreesFromRadians(*cameraOptions.angle) : self.direction; + CLLocationDirection direction = cameraOptions.angle ? mbgl::util::wrap(-MGLDegreesFromRadians(*cameraOptions.angle), 0., 360.) : self.direction; CGFloat pitch = cameraOptions.pitch ? MGLDegreesFromRadians(*cameraOptions.pitch) : _mbglMap->getPitch(); CLLocationDistance altitude = MGLAltitudeForZoomLevel(zoomLevel, pitch, centerCoordinate.latitude, From 4394c23ae720e7d245637b1a84379058daedd72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Tue, 24 Jan 2017 23:22:02 -0800 Subject: [PATCH 13/26] [ios] Publicized MGLOpenGLStyleLayer.h --- platform/ios/CHANGELOG.md | 1 + platform/ios/ios.xcodeproj/project.pbxproj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 6f6daf6be..d9e04d40c 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -4,6 +4,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT ## 3.4.1 +* Fixed a build error in the static framework flavor of this SDK caused by a missing header. ([#7844](https://github.com/mapbox/mapbox-gl-native/pull/7844)) * Fixed an issue causing MGLMapView’s `camera`’s `heading` to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s `direction` property. ([#7724](https://github.com/mapbox/mapbox-gl-native/pull/7724)) ## 3.4.0 diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj index 892dbdd39..06780ef00 100644 --- a/platform/ios/ios.xcodeproj/project.pbxproj +++ b/platform/ios/ios.xcodeproj/project.pbxproj @@ -229,7 +229,7 @@ DA6408DD1DA4E7D300908C90 /* MGLVectorStyleLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = DA6408DA1DA4E7D300908C90 /* MGLVectorStyleLayer.m */; }; DA6408DE1DA4E7D300908C90 /* MGLVectorStyleLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = DA6408DA1DA4E7D300908C90 /* MGLVectorStyleLayer.m */; }; DA72620B1DEEE3480043BB89 /* MGLOpenGLStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = DA7262091DEEE3480043BB89 /* MGLOpenGLStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DA72620C1DEEE3480043BB89 /* MGLOpenGLStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = DA7262091DEEE3480043BB89 /* MGLOpenGLStyleLayer.h */; }; + DA72620C1DEEE3480043BB89 /* MGLOpenGLStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = DA7262091DEEE3480043BB89 /* MGLOpenGLStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; DA72620D1DEEE3480043BB89 /* MGLOpenGLStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA72620A1DEEE3480043BB89 /* MGLOpenGLStyleLayer.mm */; }; DA72620E1DEEE3480043BB89 /* MGLOpenGLStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA72620A1DEEE3480043BB89 /* MGLOpenGLStyleLayer.mm */; }; DA737EE11D056A4E005BDA16 /* MGLMapViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = DA737EE01D056A4E005BDA16 /* MGLMapViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; From 35ce4f00e50ea6f16243156cc2927e38832edfe5 Mon Sep 17 00:00:00 2001 From: Jordan Kiley Date: Wed, 25 Jan 2017 09:33:27 -0800 Subject: [PATCH 14/26] Clarify that clustering option is for shape sources (#7837) * [ios] Clarify that shape source needed for clustering. Fixes #7821. --- platform/darwin/src/MGLShapeSource.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/darwin/src/MGLShapeSource.h b/platform/darwin/src/MGLShapeSource.h index a44db6947..995abadda 100644 --- a/platform/darwin/src/MGLShapeSource.h +++ b/platform/darwin/src/MGLShapeSource.h @@ -20,6 +20,8 @@ typedef NSString *MGLShapeSourceOption NS_STRING_ENUM; This attribute corresponds to the cluster source property in the Mapbox Style Specification. + + This option only affects point features within a shape source. */ extern const MGLShapeSourceOption MGLShapeSourceOptionClustered; From f5bcf186f63f0f10642dcee14a680667c36cbfdb Mon Sep 17 00:00:00 2001 From: Jordan Kiley Date: Wed, 25 Jan 2017 11:11:45 -0800 Subject: [PATCH 15/26] [ios] changed URL -> url (#7841) Changed `@param URL` -> `@param url` in `MGLShapeSource.h` Fixes #7840 --- platform/darwin/src/MGLShapeSource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/darwin/src/MGLShapeSource.h b/platform/darwin/src/MGLShapeSource.h index 995abadda..0ab3861aa 100644 --- a/platform/darwin/src/MGLShapeSource.h +++ b/platform/darwin/src/MGLShapeSource.h @@ -118,7 +118,7 @@ extern const MGLShapeSourceOption MGLShapeSourceOptionSimplificationTolerance; the source. @param identifier A string that uniquely identifies the source. - @param URL An HTTP(S) URL, absolute file URL, or local file URL relative to the + @param url An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle. @param options An `NSDictionary` of options for this source. @return An initialized shape source. From 7684bc2125a020bf44e2a99cbd49f7b3618ba52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Tue, 24 Jan 2017 13:07:34 -0800 Subject: [PATCH 16/26] [ios, macos] Testify MGLMapView gesture recognizer example --- platform/darwin/scripts/update-examples.js | 4 ++-- .../test/MGLDocumentationExampleTests.swift | 21 +++++++++++++++++++ platform/ios/src/MGLMapView.h | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/platform/darwin/scripts/update-examples.js b/platform/darwin/scripts/update-examples.js index 629132606..e6b747a46 100644 --- a/platform/darwin/scripts/update-examples.js +++ b/platform/darwin/scripts/update-examples.js @@ -108,10 +108,10 @@ function completeExamples(os) { } // Resolve conditional compilation blocks. - example = example.replace(/^(\s*)#if\s+os\((iOS|macOS)\)\n([^]*?)(?:^\1#else\n([^]*?))?^\1#endif\n/gm, + example = example.replace(/^(\s*)#if\s+os\((iOS|macOS)\)\n([^]*?)(?:^\1#else\n([^]*?))?^\1#endif\b\n?/gm, function (m, indentation, ifOs, ifCase, elseCase) { return (os === ifOs ? ifCase : elseCase).replace(new RegExp('^ ', 'gm'), ''); - }); + }).replace(/\n$/, ''); // Insert the test method contents into the documentation comment just // above the substructure. diff --git a/platform/darwin/test/MGLDocumentationExampleTests.swift b/platform/darwin/test/MGLDocumentationExampleTests.swift index d796b4e70..9336db7e4 100644 --- a/platform/darwin/test/MGLDocumentationExampleTests.swift +++ b/platform/darwin/test/MGLDocumentationExampleTests.swift @@ -217,4 +217,25 @@ class MGLDocumentationExampleTests: XCTestCase, MGLMapViewDelegate { XCTAssertNotNil(mapView.style?.layer(withIdentifier: "contour")) } + + func testMGLMapView() { + //#-example-code + #if os(macOS) + class MapClickGestureRecognizer: NSClickGestureRecognizer { + override func shouldRequireFailure(of otherGestureRecognizer: NSGestureRecognizer) -> Bool { + return otherGestureRecognizer is NSClickGestureRecognizer + } + } + #else + let mapTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(myCustomFunction)) + for recognizer in mapView.gestureRecognizers! where recognizer is UITapGestureRecognizer { + mapTapGestureRecognizer.require(toFail: recognizer) + } + mapView.addGestureRecognizer(mapTapGestureRecognizer) + #endif + //#-end-example-code + } + + // For testMGLMapView(). + func myCustomFunction() {} } diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 0d65ea2fb..1f2031e05 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -84,6 +84,7 @@ typedef NS_ENUM(NSUInteger, MGLAnnotationVerticalAlignment) { for recognizer in mapView.gestureRecognizers! where recognizer is UITapGestureRecognizer { mapTapGestureRecognizer.require(toFail: recognizer) } + mapView.addGestureRecognizer(mapTapGestureRecognizer) ``` @note You are responsible for getting permission to use the map data and for From 0a8cfdd593dc22fc0d48386608347d531971ff39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Tue, 24 Jan 2017 13:08:56 -0800 Subject: [PATCH 17/26] [macos] Refer to Night Shift in style compatibility guide --- platform/darwin/docs/guides/For Style Authors.md.ejs | 5 +++-- platform/ios/docs/guides/For Style Authors.md | 5 +++-- platform/macos/docs/guides/For Style Authors.md | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs index ee13aa113..254a7cf21 100644 --- a/platform/darwin/docs/guides/For Style Authors.md.ejs +++ b/platform/darwin/docs/guides/For Style Authors.md.ejs @@ -42,9 +42,10 @@ underneath. The user location annotation view, the attribution button, any buttons in callout views, and any items in the navigation bar are influenced by your application’s tint color, so choose a tint color that constrasts well with your -map style. If you intend your style to be used in the dark, consider the impact -that Night Shift may have on your style’s colors. +map style. <% } -%> +If you intend your style to be used in the dark, consider the impact that Night +Shift may have on your style’s colors. ### Typography and graphics diff --git a/platform/ios/docs/guides/For Style Authors.md b/platform/ios/docs/guides/For Style Authors.md index a8b6216ae..a65d07bdd 100644 --- a/platform/ios/docs/guides/For Style Authors.md +++ b/platform/ios/docs/guides/For Style Authors.md @@ -29,8 +29,9 @@ underneath. The user location annotation view, the attribution button, any buttons in callout views, and any items in the navigation bar are influenced by your application’s tint color, so choose a tint color that constrasts well with your -map style. If you intend your style to be used in the dark, consider the impact -that Night Shift may have on your style’s colors. +map style. +If you intend your style to be used in the dark, consider the impact that Night +Shift may have on your style’s colors. ### Typography and graphics diff --git a/platform/macos/docs/guides/For Style Authors.md b/platform/macos/docs/guides/For Style Authors.md index 5c9160580..78a3063b0 100644 --- a/platform/macos/docs/guides/For Style Authors.md +++ b/platform/macos/docs/guides/For Style Authors.md @@ -26,6 +26,8 @@ style is present. Standard user interface elements such as toolbars, sidebars, and sheets often overlap the map view with a translucent, blurred background, so make sure the contents of these elements remain legible with the map view underneath. +If you intend your style to be used in the dark, consider the impact that Night +Shift may have on your style’s colors. ### Typography and graphics From 1b6a4c60d709decfdc59d5a4c2a9fb6c953a9d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Wed, 25 Jan 2017 00:17:22 -0800 Subject: [PATCH 18/26] [macos] Distinguish between screens Fixed an issue causing the mouse cursor to jump after shift- or option-dragging a map view if the window opened on a screen with a different size than the screen with keyboard focus. --- platform/macos/CHANGELOG.md | 1 + platform/macos/src/MGLMapView.mm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 6f5c41feb..372fb4c81 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -5,6 +5,7 @@ This version of the Mapbox macOS SDK corresponds to version 3.4.1 of the Mapbox iOS SDK. The two SDKs have very similar feature sets. The main differences are the lack of user location tracking and annotation views. Some APIs have been adapted to macOS conventions, particularly the use of NSPopover for callout views. * Fixed an issue causing MGLMapView’s `camera`’s `heading` to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s `direction` property. ([#7724](https://github.com/mapbox/mapbox-gl-native/pull/7724)) +* Fixed an issue causing the mouse cursor to jump after shift- or option-dragging a map view if the window opened on a screen with a different size than the screen with keyboard focus. ([#7846](https://github.com/mapbox/mapbox-gl-native/pull/7846)) ## 0.3.0 diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 2b0d5f4bc..4e8f3c2b8 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1339,7 +1339,7 @@ public: // the illusion that it has stayed in place during the entire gesture. CGPoint cursorPoint = [self convertPoint:startPoint toView:nil]; cursorPoint = [self.window convertRectToScreen:{ startPoint, NSZeroSize }].origin; - cursorPoint.y = [NSScreen mainScreen].frame.size.height - cursorPoint.y; + cursorPoint.y = self.window.screen.frame.size.height - cursorPoint.y; CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cursorPoint); CGDisplayShowCursor(kCGDirectMainDisplay); } From 5dc83903d66afcb900d1363abc125a086f61384e Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Wed, 25 Jan 2017 13:38:37 -0800 Subject: [PATCH 19/26] fixes #6688: assert remaining map view notification responses are main thread (#7838) --- platform/ios/src/MGLMapView.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index acc6a3f13..db86f59a5 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -641,6 +641,8 @@ public: - (void)reachabilityChanged:(NSNotification *)notification { + MGLAssertIsMainThread(); + MGLReachability *reachability = [notification object]; if ( ! _isWaitingForRedundantReachableNotification && [reachability isReachable]) { @@ -707,6 +709,8 @@ public: - (void)didReceiveMemoryWarning { + MGLAssertIsMainThread(); + _mbglMap->onLowMemory(); } From 85f485e4edba611e058a9eb67cafda6df688a183 Mon Sep 17 00:00:00 2001 From: fabian-guerra Date: Wed, 25 Jan 2017 22:04:27 -0500 Subject: [PATCH 20/26] [ios, macos] Make MGLMapView non opaque by default (#7859) --- platform/ios/CHANGELOG.md | 1 + platform/ios/src/MGLMapView.mm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index d9e04d40c..3218039a5 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -6,6 +6,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed a build error in the static framework flavor of this SDK caused by a missing header. ([#7844](https://github.com/mapbox/mapbox-gl-native/pull/7844)) * Fixed an issue causing MGLMapView’s `camera`’s `heading` to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s `direction` property. ([#7724](https://github.com/mapbox/mapbox-gl-native/pull/7724)) +* Fixed an issue causing MGLMapView flash of black. ([#7859](https://github.com/mapbox/mapbox-gl-native/pull/7859)) ## 3.4.0 diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index db86f59a5..c9900da05 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -394,7 +394,7 @@ public: MGLinitializeRunLoop(); _isTargetingInterfaceBuilder = NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent; - _opaque = YES; + _opaque = NO; BOOL background = [UIApplication sharedApplication].applicationState == UIApplicationStateBackground; if (!background) From 8ac99759415a8d89fc8b49b702eedc6867e4e4a5 Mon Sep 17 00:00:00 2001 From: fabian-guerra Date: Wed, 25 Jan 2017 22:38:53 -0500 Subject: [PATCH 21/26] [ios, macos] Deprecate style class API (#7785) --- platform/darwin/src/MGLStyle.h | 8 ++++---- platform/ios/CHANGELOG.md | 3 ++- platform/macos/CHANGELOG.md | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h index fcb464a30..8c30b069b 100644 --- a/platform/darwin/src/MGLStyle.h +++ b/platform/darwin/src/MGLStyle.h @@ -361,7 +361,7 @@ static const NSInteger MGLStyleDefaultVersion = 9; /** Currently active style classes, represented as an array of string identifiers. */ -@property (nonatomic) NS_ARRAY_OF(NSString *) *styleClasses; +@property (nonatomic) NS_ARRAY_OF(NSString *) *styleClasses __attribute__((deprecated("This property will be removed in a future release."))); /** Returns a Boolean value indicating whether the style class with the given @@ -370,14 +370,14 @@ static const NSInteger MGLStyleDefaultVersion = 9; @param styleClass The style class to query for. @return Whether the style class is currently active. */ -- (BOOL)hasStyleClass:(NSString *)styleClass; +- (BOOL)hasStyleClass:(NSString *)styleClass __attribute__((deprecated("This method will be removed in a future release."))); /** Activates the style class with the given identifier. @param styleClass The style class to activate. */ -- (void)addStyleClass:(NSString *)styleClass; +- (void)addStyleClass:(NSString *)styleClass __attribute__((deprecated("This method will be removed in a future release."))); /** Deactivates the style class with the given identifier. @@ -392,7 +392,7 @@ static const NSInteger MGLStyleDefaultVersion = 9; @param styleClass The style class to deactivate. */ -- (void)removeStyleClass:(NSString *)styleClass; +- (void)removeStyleClass:(NSString *)styleClass __attribute__((deprecated("This method will be removed in a future release."))); #pragma mark Managing a Style’s Images diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 3218039a5..f6409b317 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -2,11 +2,12 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. -## 3.4.1 +## 3.4.1 * Fixed a build error in the static framework flavor of this SDK caused by a missing header. ([#7844](https://github.com/mapbox/mapbox-gl-native/pull/7844)) * Fixed an issue causing MGLMapView’s `camera`’s `heading` to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s `direction` property. ([#7724](https://github.com/mapbox/mapbox-gl-native/pull/7724)) * Fixed an issue causing MGLMapView flash of black. ([#7859](https://github.com/mapbox/mapbox-gl-native/pull/7859)) +* Style class methods in `MGLStyle` marked as deprecated. ([#7785](https://github.com/mapbox/mapbox-gl-native/pull/7785)) ## 3.4.0 diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 372fb4c81..496b79d4f 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -6,6 +6,7 @@ This version of the Mapbox macOS SDK corresponds to version 3.4.1 of the Mapbox * Fixed an issue causing MGLMapView’s `camera`’s `heading` to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s `direction` property. ([#7724](https://github.com/mapbox/mapbox-gl-native/pull/7724)) * Fixed an issue causing the mouse cursor to jump after shift- or option-dragging a map view if the window opened on a screen with a different size than the screen with keyboard focus. ([#7846](https://github.com/mapbox/mapbox-gl-native/pull/7846)) +* Style class methods in `MGLStyle` marked as deprecated. ([#7785](https://github.com/mapbox/mapbox-gl-native/pull/7785)) ## 0.3.0 From aa47ed77a6f71869ad4658d8557e627711607d93 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Wed, 25 Jan 2017 22:51:59 -0500 Subject: [PATCH 22/26] [ios, macos] Copy-edit changelogs --- platform/ios/CHANGELOG.md | 4 ++-- platform/macos/CHANGELOG.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index f6409b317..550b09a01 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -6,8 +6,8 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed a build error in the static framework flavor of this SDK caused by a missing header. ([#7844](https://github.com/mapbox/mapbox-gl-native/pull/7844)) * Fixed an issue causing MGLMapView’s `camera`’s `heading` to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s `direction` property. ([#7724](https://github.com/mapbox/mapbox-gl-native/pull/7724)) -* Fixed an issue causing MGLMapView flash of black. ([#7859](https://github.com/mapbox/mapbox-gl-native/pull/7859)) -* Style class methods in `MGLStyle` marked as deprecated. ([#7785](https://github.com/mapbox/mapbox-gl-native/pull/7785)) +* Fixed an issue where MGLMapView could initially flash black before loading. ([#7859](https://github.com/mapbox/mapbox-gl-native/pull/7859)) +* Deprecated the style class methods in MGLStyle. ([#7785](https://github.com/mapbox/mapbox-gl-native/pull/7785)) ## 3.4.0 diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 496b79d4f..7501fa233 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -6,7 +6,7 @@ This version of the Mapbox macOS SDK corresponds to version 3.4.1 of the Mapbox * Fixed an issue causing MGLMapView’s `camera`’s `heading` to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s `direction` property. ([#7724](https://github.com/mapbox/mapbox-gl-native/pull/7724)) * Fixed an issue causing the mouse cursor to jump after shift- or option-dragging a map view if the window opened on a screen with a different size than the screen with keyboard focus. ([#7846](https://github.com/mapbox/mapbox-gl-native/pull/7846)) -* Style class methods in `MGLStyle` marked as deprecated. ([#7785](https://github.com/mapbox/mapbox-gl-native/pull/7785)) +* Deprecated the style class methods in MGLStyle. ([#7785](https://github.com/mapbox/mapbox-gl-native/pull/7785)) ## 0.3.0 From 01ceae1a8e1d64251744e357bd4f3335853ff663 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Wed, 25 Jan 2017 22:52:39 -0500 Subject: [PATCH 23/26] ios-v3.4.1 --- platform/ios/Mapbox-iOS-SDK-symbols.podspec | 2 +- platform/ios/Mapbox-iOS-SDK.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/ios/Mapbox-iOS-SDK-symbols.podspec b/platform/ios/Mapbox-iOS-SDK-symbols.podspec index b1c60ca9d..69b8e804d 100644 --- a/platform/ios/Mapbox-iOS-SDK-symbols.podspec +++ b/platform/ios/Mapbox-iOS-SDK-symbols.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '3.4.0' + version = '3.4.1' m.name = 'Mapbox-iOS-SDK-symbols' m.version = "#{version}-symbols" diff --git a/platform/ios/Mapbox-iOS-SDK.podspec b/platform/ios/Mapbox-iOS-SDK.podspec index e815eb69a..bfe46a7f2 100644 --- a/platform/ios/Mapbox-iOS-SDK.podspec +++ b/platform/ios/Mapbox-iOS-SDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - version = '3.4.0' + version = '3.4.1' m.name = 'Mapbox-iOS-SDK' m.version = version From b826d043d01060acd96e568706f94cfab9163df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Tue, 24 Jan 2017 22:08:17 +0100 Subject: [PATCH 24/26] [macos] allow using the integrated GPU on dual-GPU machines Cherry-picked from e7a7c6be789198a8155dc229ea509dd7aecf4756. --- platform/default/headless_display.cpp | 2 ++ platform/macos/app/Info.plist | 2 ++ platform/macos/src/MGLOpenGLLayer.mm | 1 + 3 files changed, 5 insertions(+) diff --git a/platform/default/headless_display.cpp b/platform/default/headless_display.cpp index b98aef790..aa57d66cd 100644 --- a/platform/default/headless_display.cpp +++ b/platform/default/headless_display.cpp @@ -17,6 +17,8 @@ HeadlessDisplay::HeadlessDisplay() { CGLPixelFormatAttribute attributes[] = { kCGLPFAOpenGLProfile, static_cast(kCGLOGLPVersion_Legacy), + kCGLPFASupportsAutomaticGraphicsSwitching, + kCGLPFAAllowOfflineRenderers, // Allows using the integrated GPU static_cast(0) }; diff --git a/platform/macos/app/Info.plist b/platform/macos/app/Info.plist index cc7037f58..21b86bfc7 100644 --- a/platform/macos/app/Info.plist +++ b/platform/macos/app/Info.plist @@ -52,5 +52,7 @@ MainMenu NSPrincipalClass NSApplication + NSSupportsAutomaticGraphicsSwitching + diff --git a/platform/macos/src/MGLOpenGLLayer.mm b/platform/macos/src/MGLOpenGLLayer.mm index e8fa52135..523b58505 100644 --- a/platform/macos/src/MGLOpenGLLayer.mm +++ b/platform/macos/src/MGLOpenGLLayer.mm @@ -32,6 +32,7 @@ NSOpenGLPFADepthSize, 16, NSOpenGLPFAStencilSize, 8, NSOpenGLPFAScreenMask, mask, + NSOpenGLPFAAllowOfflineRenderers, // Allows using the integrated GPU 0 }; return [[NSOpenGLPixelFormat alloc] initWithAttributes:pfas]; From e35c1f8c87354bb20f9485efa4e0d77ea5bf35b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Wed, 25 Jan 2017 10:58:47 +0100 Subject: [PATCH 25/26] [macos] align HeadlessDisplay with SDK OpenGL context creation options Cherry-picked from 2a077eaa5483b243e817a328adaea1027a48e7a7. --- platform/default/headless_display.cpp | 10 ++++++++-- platform/macos/src/MGLOpenGLLayer.mm | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/platform/default/headless_display.cpp b/platform/default/headless_display.cpp index aa57d66cd..b61848d1a 100644 --- a/platform/default/headless_display.cpp +++ b/platform/default/headless_display.cpp @@ -15,8 +15,14 @@ HeadlessDisplay::HeadlessDisplay() { // TODO: test if OpenGL 4.1 with GL_ARB_ES2_compatibility is supported // If it is, use kCGLOGLPVersion_3_2_Core and enable that extension. CGLPixelFormatAttribute attributes[] = { - kCGLPFAOpenGLProfile, - static_cast(kCGLOGLPVersion_Legacy), + kCGLPFAOpenGLProfile, static_cast(kCGLOGLPVersion_Legacy), + // Not adding kCGLPFAAccelerated, as this will make headless rendering impossible when running in VMs. + kCGLPFAClosestPolicy, + kCGLPFAAccumSize, static_cast(32), + kCGLPFAColorSize, static_cast(24), + kCGLPFAAlphaSize, static_cast(8), + kCGLPFADepthSize, static_cast(16), + kCGLPFAStencilSize, static_cast(8), kCGLPFASupportsAutomaticGraphicsSwitching, kCGLPFAAllowOfflineRenderers, // Allows using the integrated GPU static_cast(0) diff --git a/platform/macos/src/MGLOpenGLLayer.mm b/platform/macos/src/MGLOpenGLLayer.mm index 523b58505..654fa4f2b 100644 --- a/platform/macos/src/MGLOpenGLLayer.mm +++ b/platform/macos/src/MGLOpenGLLayer.mm @@ -24,6 +24,7 @@ - (NSOpenGLPixelFormat *)openGLPixelFormatForDisplayMask:(uint32_t)mask { NSOpenGLPixelFormatAttribute pfas[] = { + NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersionLegacy, NSOpenGLPFAAccelerated, NSOpenGLPFAClosestPolicy, NSOpenGLPFAAccumSize, 32, From 042831604bab0983262146047d6be0e453b0d55d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Wed, 25 Jan 2017 11:28:41 +0100 Subject: [PATCH 26/26] [docs] add changelog entry for #7834 Cherry-picked from be790addb4c7093bacf283708734405be050758a. --- platform/macos/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 7501fa233..523c9368d 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -5,6 +5,7 @@ This version of the Mapbox macOS SDK corresponds to version 3.4.1 of the Mapbox iOS SDK. The two SDKs have very similar feature sets. The main differences are the lack of user location tracking and annotation views. Some APIs have been adapted to macOS conventions, particularly the use of NSPopover for callout views. * Fixed an issue causing MGLMapView’s `camera`’s `heading` to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s `direction` property. ([#7724](https://github.com/mapbox/mapbox-gl-native/pull/7724)) +* Allows use of the integrated GPU on machines that have more than one GPU. Follow [Apple’s Technical QA1734](https://developer.apple.com/library/content/qa/qa1734/_index.html) to enable this in your app. ([#7834](https://github.com/mapbox/mapbox-gl-native/pull/7834)) * Fixed an issue causing the mouse cursor to jump after shift- or option-dragging a map view if the window opened on a screen with a different size than the screen with keyboard focus. ([#7846](https://github.com/mapbox/mapbox-gl-native/pull/7846)) * Deprecated the style class methods in MGLStyle. ([#7785](https://github.com/mapbox/mapbox-gl-native/pull/7785))