Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Merge branch release-ios-v3.4.0 into master (after beta 2) #6902

Merged
merged 27 commits into from
Nov 3, 2016

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Nov 3, 2016

This merges release-ios-v3.4.0 at 7c68d77 (after beta 2 but before beta 3) into master at b8a2fd3. No conflicts.

/cc @boundsj @JesseCrocker

friedbunny and others added 27 commits October 18, 2016 16:43
Also:
 - Ignore stdout from github-release uploads.
 - Add execution time to finished message.
Upload any events collected when the app was in use for apps that only
have "when in use" location permissions. Also, for all apps, avoid
posting event data if there is only a single event.
Implement the layer property on MGLStyleLayer itself, where it’s declared, so that the check for an abstract style layer doesn’t itself raise an exception. The concrete style layer classes still declare their own layers as covariant properties, although those properties aren’t actually used anywhere.

Cherry-picked from ce24304.
* [ios, macos] Make feature attributes and identifier writable

Instances of MGLFeature subclasses can now have their attributes
and identifier properties mutated.
* [ios, macos] Introduce MGLPointCollection

This makes MGLMultiPoint abstract again so that it is only a place 
for shared functionality of polygons and polylines. The multipoint 
feature replaces the point collection feature and can be
used to initialize a MGLGeoJSONSource. The previously added 
swift_names for polyline and polygon are removed, for now.

This also updates the iOS and macOS annotation adding logic so that
unwanted shapes really are avoided. Previously the combined OR
conditions  meant that an annotation had to logically be NOT a kind
of all three types so the check always let the annotation slip through.
This also expands the guard to deflect the new MGLPointCollection.
MGLStyleConstantValue and MGLStyleFunction now inherit from MGLStyleValue with a generic argument matching the child class’s own generic argument.

Fixes #6823.
Added tests of MGLStyleValue written in Swift, along with bridging headers just in case they become needed in the future.
…perties writable

Use common initialization logic to create an unique pointer to an mbgl
source object, up front, when a MGL source is created. Keep a raw
pointer to the unique pointer that is pointed at the mbgl source
instance when a MGL source is created or when a MGL source is
obtained by identifier from MGLStyle. Once the transfer of ownership of the 
mbgl source takes place, the unique ptr is null. The raw pointer can be used 
internally for future work that involves mutating the source.

This also changes the URL, features, and geoJSONData content 
properties for MGLGeoJSON source to be writable. If they are set with
valid data after a source has been added to the map then the map will
update to reflect the new data.
Add visibleAnnotations API to make it easier for clients of MGLMapView
to query for all visible annotations in the map or all visible annotations
in a subsection of the map.
- Select best language based on locale setting and our support.
Doing this work in viewDidAppear meant that it happened every time the
modal debug settings view disappeared (and the map view reappeared).
Also support base URL nullability in order to use default value.
Use queryPointAnnotations to drive annotation view updates

- Get sets of visible and offscreen annotations using the mbgl query 
mechanism and updates and enqueues as required
- Query viewport adjusted if tilted (avoid apparent issue with
queryPointAnnotations when the query box is larger than the actual
viewport)
- Add a small debugging display in iOS app to see annotations going in
and out of the reuse queue

This also works around a performance issue that made getting an annotation
context expensive by implementing a map of annotations to tags. It works 
around another issue with the underlying mbgl query so that even if it (rarely) 
returns an incorrect result, the correct visual effect still occurs and the reuse 
queue is added to and drained as expected.

Finally, this refactors MGLMapView viewForAnnotation: to use the maps to
access the requested annotation context and view. This avoids a more
expensive lookup done previously.

Along for the ride: sync up the ios and macos names (and types) for
MGLAnnotationTagContextMap
Although functionality was not affected, a previous merge garbled
the language test with a temporary test done for annotation view
performance improvement.
Notification names and user info keys posted by MGLOfflineStorage, as well as MGLErrorDomain, are instances of string enumerations for ease of use in Swift. Added some shims for projects built with Xcode 7.x.

Fixes #6791.
Renamed MGLGeoJSONSourceOption and MGLOfflinePackUserInfoKey constants for clarity and to remove redundancy in the Swift-bridged names. Left the old MGLOfflinePackUserInfoKey constants in place as deprecated aliases.
Moved MGLGeoJSONSourceTests and MGLTileSetTests into platform/darwin/test/ and added them to the macOS project. Also added a private header needed to compile the tests to the macOS project.
This header was missing from the project. The code was only compiling because the header was still on the search path.
Fixed an issue that caused the runtime styling API to return colors in the sRGB color space instead of the calibrated RGB color space.
Added the style layer tests to the test bundle target.

Set the access token to a bogus access token before running any tests. The macOS implementation of MGLMapView doesn’t even attempt to set a default style if the access token is missing, because in macosapp, the access token may be set asynchronously by the user when the preferences window appears.
@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS labels Nov 3, 2016
@1ec5 1ec5 added this to the ios-v3.4.0 milestone Nov 3, 2016
@1ec5 1ec5 self-assigned this Nov 3, 2016
@mention-bot
Copy link

@1ec5, thanks for your PR! By analyzing the history of the files in this pull request, we identified @boundsj, @ituaijagbone and @frederoni to be potential reviewers.

@1ec5 1ec5 merged commit 4f40fce into master Nov 3, 2016
@1ec5 1ec5 deleted the 1ec5-release-ios-v3.4.0-beta.2-master branch November 3, 2016 20:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants