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

Add Clarification for modifying ShapeCollections #7683

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion platform/darwin/src/MGLShapeSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

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.
Copy link
Contributor

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.

*/
@property (nonatomic, copy, nullable) MGLShape *shape;

Expand Down