-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add Clarification for modifying ShapeCollections #7683
Conversation
Spinoff task from #7622
@nitrag, thanks for your PR! By analyzing this pull request, we identified @1ec5, @boundsj and @friedbunny to be potential reviewers. |
@@ -116,11 +116,14 @@ MGL_EXPORT | |||
|
|||
/** | |||
The contents of the source. A shape can represent a GeoJSON geometry, a | |||
feature, or a collection of features. | |||
feature, or a collection of features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: trailing whitespace.
|
||
If the receiver was initialized using `-initWithIdentifier:URL:options:`, this | ||
property is set to `nil`. This property is unavailable until the receiver is | ||
passed into `-[MGLStyle addSource:]`. | ||
|
||
You can get/set the shapes within a collection via this property. Setting | ||
this property must be performed on the application's main thread. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that the setter isn’t background-thread-safe, I’d be surprised if the getter were completely thread-safe. Best to say that this property must be accessed on the main thread and leave it at that.
By the way, we’re developing v3.4.x on the release-ios-v3.4.0 branch, while master is for v3.5.0 and beyond. We’re merging back to master approximately once per beta. Since this is such a small change, I can cherry-pick it once it lands, but you may find it more convenient to start changes on the release branch until v3.4.0 goes out the door. |
Learned my lesson with source branch this go around, will do for next time. Thanks! |
The master branch is protected, so I can’t merge this PR until the bots pass. However, this repository’s CI bots only run for branches pushed to mapbox/mapbox-gl-native, not a fork. Ordinarily, I’d get around this issue by pushing an identical branch to this repository, using the same name that you used on your fork; GitHub would use that branch for this PR, and the bots would start building the changes without a problem. Unfortunately, you requested to pull from your fork’s master branch, and I can’t push a new branch named “master”. So I pushed a new PR, #7687, targeted at the release-ios-v3.4.0 branch. In the future, when you create a PR, please consider pushing your changes to a branch of your fork. That’ll make it clearer which changes are part of the PR and much easier to merge your changes into master. Thanks! |
Spinoff task from #7622
@1ec5