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

[ios, macos] Add notes to APIs that rely on style and source ids - #6886

Merged
boundsj merged 1 commit into
release-ios-v3.4.0from
boundsj-warn-about-style-ids
Nov 30, 2016
Merged

boundsj merged 1 commit into
release-ios-v3.4.0from
boundsj-warn-about-style-ids

Conversation

@boundsj

@boundsj boundsj commented Nov 2, 2016

Copy link
Copy Markdown
Contributor

Fixes #6616 for iOS and macOS

cc @1ec5

@boundsj boundsj added iOS Mapbox Maps SDK for iOS documentation release blocker Blocks the next final release runtime styling labels Nov 2, 2016
@boundsj boundsj added this to the ios-v3.4.0 milestone Nov 2, 2016
@boundsj boundsj self-assigned this Nov 2, 2016
@mention-bot

Copy link
Copy Markdown

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

Comment thread platform/darwin/src/MGLStyle.h Outdated
Returns a layer that conforms to `MGLStyleLayer` if any layer with the given
identifier was found.

@note Layer identifiers are subject to change and are not guaranteed to exist

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an awkward place to put “subject to change”. Maybe in the next sentence, say that the default style’s layers are subject to change.

Comment thread platform/darwin/src/MGLStyle.h Outdated
@note Layer identifiers are subject to change and are not guaranteed to exist
accross styles or different versions of the same style. Applications that
use this API must set the style URL to an explicitly versioned style
using a convenience method like +[MGLStyle outdoorsStyleURLWithVersion:],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrap this selector in backticks to enable autolinking in jazzy.

Comment thread platform/darwin/src/MGLStyle.h Outdated
accross styles or different versions of the same style. Applications that
use this API must set the style URL to an explicitly versioned style
using a convenience method like +[MGLStyle outdoorsStyleURLWithVersion:],
the “Style URL” IBInspectable in `MGLMapView`, or a manually constructed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MGLMapView’s “Style URL” inspectable in Interface Builder

@1ec5

1ec5 commented Nov 2, 2016 •

Copy link
Copy Markdown
Contributor

Additional APIs to warn about:

  • -[MGLStyle removeLayer:]
  • -[MGLStyle removeSource:]
  • -[MGLStyle removeStyleClass:]
  • -[MGLStyle removeImageForName:]
  • -[MGLMapView visibleFeaturesInRect:inStyleLayersWithIdentifiers:]
  • -[MGLMapView visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:]
  • -[MGLMapView style] while we’re at it

@boundsj

boundsj commented Nov 3, 2016

Copy link
Copy Markdown
Contributor Author

Before I move on to #6886 (comment) I took another pass at the copy. Please let me know what you think.

Comment thread platform/darwin/src/MGLStyle.h Outdated
identifier was found.

@note Layer identifiers are not guaranteed to exist across styles or different
versions of the same style. Applications that use this API must set the style

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/must/must first/

I think that could be a point of confusion for developers.

Comment thread platform/darwin/src/MGLStyle.h Outdated
versions of the same style. Applications that use this API must set the style
URL to an explicitly versioned style using a convenience method like
`+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`'s “Style URL”
inspectable in Interface Builder, or a manually constructed NSURL. This

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: put NSURL in backticks (for consistency with SDK classes that would get autolinked, even if this one doesn’t get linked).

Comment thread platform/ios/src/MGLMapView.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the macOS implementation of MGLMapView with these changes as well.

Comment thread platform/darwin/src/MGLStyle.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/layer/source/ (×2)

@boundsj
boundsj force-pushed the boundsj-warn-about-style-ids branch from 692b0bb to 4afe9f7 Compare November 14, 2016 17:47
@boundsj

boundsj commented Nov 17, 2016

Copy link
Copy Markdown
Contributor Author

@1ec5 what do you think about this now?

@1ec5

1ec5 commented Nov 18, 2016

Copy link
Copy Markdown
Contributor

I think there’s still a typo in a couple places: #6886 (comment)

@boundsj
boundsj force-pushed the boundsj-warn-about-style-ids branch from 4afe9f7 to f990b31 Compare November 30, 2016 00:20
@boundsj

boundsj commented Nov 30, 2016

Copy link
Copy Markdown
Contributor Author

Corrected and rebased @1ec5

@boundsj
boundsj merged commit ba77540 into release-ios-v3.4.0 Nov 30, 2016
@boundsj
boundsj deleted the boundsj-warn-about-style-ids branch November 30, 2016 17:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation iOS Mapbox Maps SDK for iOS release blocker Blocks the next final release runtime styling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants