Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify Style.transition usage for changing styles #1162

Merged
merged 2 commits into from
Mar 3, 2022
Merged
Changes from all commits
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
16 changes: 9 additions & 7 deletions Sources/MapboxMaps/Style/Style.swift
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,15 @@ public final class Style: StyleProtocol {
/// Get or set the map style's transition options.
///
/// By default, the style parser will attempt to read the style default
/// transition options, if any, falling back to an immediate transition
/// otherwise.
///
/// The style transition is re-evaluated when a new style is loaded.
///
/// - Attention:
/// Overridden transition options are reset once a new style has been loaded.
/// transition, if any, falling back to a 0.3 s transition otherwise.
///
/// Overridden transitions are reset once a new style has been loaded.
/// To customize the transition used when switching styles, set this
/// property after `MapEvents.EventKind.styleDataLoaded` where
/// `Event.type == "style"` and before
/// `MapEvents.EventKind.styleDataLoaded` where `Event.type == "sprite"`
/// and where `Event.type == "sources"`.
/// - SeeAlso: ``MapboxMap/onNext(_:handler:)``
public var transition: TransitionOptions {
get {
styleManager.getStyleTransition()
Expand Down