This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Merge branch release-ios-v3.4.0 to master (after beta 4) - #7282
Merged
Merged
Conversation
…6888) * [ios] Store annotation tags for MGLMultiPoint annotations in the map This fixes an issue where, if a multipoint annotation was added, native annotation view update logic would crash. Adding the annotation tag for multipoints, too, avoids the out of range exception. This also adds a check for MGLMultiPoint for offscreen annotations for consistency with the onscreen case.
When annotations are removed concurrently with being updated because of a map redraw, it is possible that mbgl will still consider an annotation to exist depending on what part of the map lifecycle the call update annotations happens. However, the annotation context by tag map in MGLMapView (on the main thread) will always be up to date. This adds a guard that uses that map to avoid considering annotations that have actually been removed as visible. Another issue was that adding the same annotation object twice has always been allowed and has worked, visually. However, a recent refactor to make the reuse queue work correctly is not tolerant of the a single view representing two annotation instances that are the same. The effect is that a new UIView will be generated for each (clone) annotation that is added and only the last view will move with the map. The other views become detached and float around in the view as the map is panned. This commit adds a guard to make adding an annotation instance a no-op if it has already been added before.
Define NSErrorDomain before its first use. Define NSNotificationName as a typedef instead of a #define. Guard these shims on the existence of NS_STRING_ENUM rather than another macro that’s new to Xcode 8. Fixes #6906.
`MGLStyleLayer` was updated to support a raw pointer to the mbgl object, which is always initialized, either to the value returned by `mbgl::Map getLayer`, or for independently created objects, to the pointer value held in `pendingLayer`. In the latter case, this raw pointer value stays even after ownership of the object is transferred via `mbgl::Map addLayer`.
A previous refactor neglected to remove the unused `layer` property. This removes that property and uses the rawLayer property that actually points to the mbgl layer.
Optimized lookup of annotation tags by annotation from O(n) to a simple map lookup, for better performance and consistency with the iOS implementation of MGLMapView.
Streamlined -[MGLMapView annotationTagForAnnotation:] to use the mapping added in #5987. Reverted an unsafe access into that mapping that was added in #5987; returning nil is preferable when no such annotation can be found. Return the user location annotation view when given the user location annotation.
Enable OSMesa backend via WITH_OSMESA=1 envvar. OSMesa backend uses Gallium OSMesa implementation, which uses LLVMpipe as default driver.
When a source or layer is removed transfer ownership back to the caller so it can (optionally) take it. Preserve the behavior that removing a CustomLayer triggers deinitialization. Deinitialize all custom layers when a style is destroyed in case those layers are not explicitly removed.
Removed individual OHHTTPStubs file references from the ios-tests project. Added a reference to the OHHTTPStubs project to the workspace. Link ios-tests to its iOS framework build product.
If a source or layer is removed from the style, recapture the unique pointer ownership. This makes it safe to add back sources and layers after they have been removed.
NSLayoutRelationGreaterThanOrEqual meant that it either greater-than or equal could satisify the constraint, when really all we need is equal.
In iOS 10, the top layout guide is not always returning the expected value unless there is a constraint applied directly against it.
Update documentation to make the implications of identifiers clearer.
This updates the code generation for style layers to add a test to check that the style object returned from mbgl can be safely cast into the expected type so ownership can be returned to the caller when removing layers. This scenario was previously possible if a layer of type T was added before a layer of type U but both layers shared the same identifier. In that case, if the pointer to the second layer of type U was used to remove a layer, a runtime exception would occur since mbgl returns the layer with type T (the first one added). Now, an exception will still occur if layers with the same identifier are manipulated as described above but it is done as part of a validation check for all public style layer methods at the Darwin platform level. The NSException attempts to warn developers about using and reusing style identifiers to avoid this issue in the first place.
This updates the cert for the staging environment. It also adjusts the telem implementation to send along the horizontal accuracy for each location event and removes the previous battery level gathering logic.
.der files are used only by the iOS platform for SSL pinning. This moves them out of the `platform/default/resources` directory and into `platform/ios/resources`. The make configuration for Android is updated so that it stops attempting to copy the files at all.
This reverts commit 6877e3e.
Note the support of CONTAINS and the lack of support for case and diacritic operator modifiers.
…ng (#7246) * Make tap gesture recognizer fail if it doesn’t do anything. * fix typo * Use the right nullable * update changelog * Make single click gesture recognizer fail if it doesn’t select an annotation * fix changelog typo * Remove singleTapGestureRecognizer from public header
When MGLSource and MGLLayer instances are added to the style, they lose ownership of their std::unique_ptr<T> after it is moved to the mbgl level. Subsequent attempts to add such instances result in a C++ exception. This adds logic in the Darwin platform to raise a NSException if the source and layer addToMapView methods are called more than once and the pointer is invalid. In addition, the documentation in MGLStyle for addSource: and addLayer: has been update to warn developers to avoid adding the same instance twice and, for that matter, instances with the same identifier.
This replaces the integration test of `addSource` when duplicate identifiers are used in `MGLSourceTests` with a more direct unit test in the style class's unit test file `MGLStyleTests`. Although tests of the case where the same instance are actually integration tests where the source instance itself throws, it is easier to test all of this functionality in one place using the public facing MGLStyle API.
This adds notes to the methods for adding sources and layers to warn of the hazards of using duplicate instances or identifiers.
|
@1ec5, thanks for your PR! By analyzing this pull request, we identified @incanus, @boundsj and @friedbunny to be potential reviewers. |
Contributor
Author
boundsj
approved these changes
Dec 2, 2016
1ec5
force-pushed
the
1ec5-release-ios-v3.4.0-beta.4-master
branch
from
December 3, 2016 23:36
d0c1d93 to
3503c0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This merges release-ios-v3.4.0 at 9eb7f88 (well after beta 4 but before beta 5) into master at 8403883. This was a challenging merge because of the many changes that were cherry-picked into the release branch, some out of order. When remerging the release branch into this branch for the second time, I had to redo 2db31be (#7279) by hand because git passed over that change completely.
/cc @boundsj @jfirebaugh @ivovandongen