MapboxMaps Docs Mapbox Maps SDK for iOS Reference (v10.16.2) (87% documented)

MapboxMaps Reference Viewport Reference
  • MapView
    • MapView
    • – SnapshotError
    • MapInitOptions
    • MapInitOptionsProvider
    • ResourceOptions
    • ResourceOptionsManager
    • MapOptions
    • GlyphsRasterizationOptions
    • InterfaceOrientationProvider
    • AttributionURLOpener
  • Snapshotter
    • Snapshotter
    • – SnapshotError
    • MapSnapshotOptions
    • SnapshotOverlay
    • SnapshotOverlayHandler
  • MapboxMap
    • MapboxMap
    • CameraState
    • CameraOptions
    • CameraBounds
    • CameraBoundsOptions
    • CoordinateBounds
    • Event
    • MapEvents
    • – EventKind
    • – Event
    • RenderedQueryOptions
    • QueriedFeature
    • FeatureExtensionValue
    • MapError
    • MapLoadingError
  • Style
    • Style
    • StyleURI
    • LayerPosition
    • TransitionOptions
    • Light
    • Terrain
    • StyleDecodable
    • StyleEncodable
    • StyleError
    • TypeConversionError
  • Sources
    • Source
    • SourceType
    • SourceInfo
    • GeoJSONSource
    • GeoJSONSourceData
    • ImageSource
    • RasterDemSource
    • RasterSource
    • VectorSource
    • PromoteId
    • Scheme
    • Encoding
  • Layers
    • Layer
    • LayerType
    • LayerInfo
    • BackgroundLayer
    • CircleLayer
    • FillExtrusionLayer
    • FillLayer
    • HeatmapLayer
    • HillshadeLayer
    • LineLayer
    • LocationIndicatorLayer
    • RasterLayer
    • SkyLayer
    • SymbolLayer
    • ModelLayer
  • Layer Property Values
    • Value
    • Anchor
    • CirclePitchAlignment
    • CirclePitchScale
    • CircleTranslateAnchor
    • FillExtrusionTranslateAnchor
    • FillTranslateAnchor
    • HillshadeIlluminationAnchor
    • IconAnchor
    • IconPitchAlignment
    • IconRotationAlignment
    • IconTextFit
    • IconTranslateAnchor
    • LineCap
    • LineJoin
    • LineTranslateAnchor
    • RasterResampling
    • ResolvedImage
    • ResolvedImageData
    • SkyType
    • ModelType
    • StyleColor
    • StyleTransition
    • SymbolPlacement
    • SymbolZOrder
    • TextAnchor
    • TextJustify
    • TextPitchAlignment
    • TextRotationAlignment
    • TextTransform
    • TextTranslateAnchor
    • TextWritingMode
    • Visibility
  • Expressions
    • Expression
    • – Element
    • – Argument
    • – Operator
    • – Option
    • Exp
    • FormatOptions
    • NumberFormatOptions
    • CollatorOptions
  • Annotations
    • AnnotationOrchestrator
    • AnnotationInteractionDelegate
    • Annotation
    • AnnotationManager
    • CircleAnnotation
    • CircleAnnotationManager
    • PointAnnotation
    • – Image
    • PointAnnotationManager
    • PolygonAnnotation
    • PolygonAnnotationManager
    • PolylineAnnotation
    • PolylineAnnotationManager
    • ClusterOptions
  • View Annotations
    • ViewAnnotationManager
    • ViewAnnotationUpdateObserver
    • ViewAnnotationOptions
    • ViewAnnotationManagerError
  • Camera Animations
    • CameraAnimationsManager
    • CameraAnimator
    • BasicCameraAnimator
    • CameraTransition
    • – Change
    • FlyToCameraAnimator
    • AnimationCompletion
    • AnimationOwner
  • Ornaments
    • OrnamentsManager
    • OrnamentOptions
    • OrnamentPosition
    • OrnamentVisibility
    • AttributionButtonOptions
    • CompassViewOptions
    • LogoViewOptions
    • ScaleBarViewOptions
  • Gestures
    • GestureManager
    • GestureOptions
    • PanMode
    • GestureManagerDelegate
    • GestureType
  • Location
    • LocationManager
    • LocationOptions
    • PuckType
    • Puck2DConfiguration
    • – Pulsing
    • Puck3DConfiguration
    • Model
    • Location
    • LocationConsumer
    • LocationPermissionsDelegate
    • LocationProvider
    • LocationProviderDelegate
    • AppleLocationProvider
  • Viewport
    • Viewport
    • ViewportOptions
    • ViewportStatus
    • ViewportStatusObserver
    • ViewportStatusChangeReason
    • ViewportState
    • FollowPuckViewportState
    • FollowPuckViewportStateOptions
    • FollowPuckViewportStateBearing
    • OverviewViewportState
    • OverviewViewportStateOptions
    • ViewportTransition
    • DefaultViewportTransition
    • DefaultViewportTransitionOptions
    • ImmediateViewportTransition
  • Offline
    • OfflineManager
    • OfflineRegionGeometryDefinition
    • OfflineSwitch
    • StylePackError
    • StylePackLoadOptions
    • TileRegionError
    • TileRegionLoadOptions
    • TilesetDescriptorOptions
    • TileStore
    • TileStoreObserver
  • GeoJSON
    • Feature
    • Geometry
  • Utilities
    • CompassDirectionFormatter
    • – Style
    • Projection
  • Other
    • Cancelable
  • Other Classes
    • MapEvent
    • MapRecorder
  • Other Enumerations
    • PuckBearing
    • RenderMode
    • ResourceDataSource
    • SourceDataType
    • StyleDataType
    • StyleProjectionName
  • Other Extensions
    • DispatchWorkItem
    • TilesetDescriptorOptionsForTilesets
  • Other Protocols
    • MapViewMetricsReporter
    • PuckLocationConsumer
  • Other Structures
    • Atmosphere
    • MapLoadingErrorPayload
    • NoPayload
    • RenderFrameFinishedPayload
    • ResourceRequest
    • – Kind
    • – Priority
    • – LoadingMethod
    • ResourceRequestPayload
    • ResourceResponse
    • – Source
    • – Error
    • SourceAddedPayload
    • SourceDataLoadedPayload
    • SourceRemovedPayload
    • StyleDataLoadedPayload
    • StyleImageMissingPayload
    • StyleImageUnusedPayload
    • StyleProjection
    • TileCoverOptions

Viewport

  • Viewport

    Viewport provides a structured approach to organizing camera management logic into states and transitions between them.

    At any given time, the viewport is either:

    • idle (not updating the camera)
    • in a state (camera is being managed by a ViewportState)
    • transitioning (camera is being managed by a ViewportTransition)
    See more

    Declaration

    Swift

    public final class Viewport
  • ViewportOptions

    Configuraton options for Viewport.

    See more

    Declaration

    Swift

    public struct ViewportOptions : Hashable
  • ViewportStatus

    ViewportStatus contains 3 cases that express what the Viewport is doing at any given time.

    The state(_:) and transition(_:toState:) cases have associated values that are reference types, so equality and hash are implemented in terms of the identities of those objects.

    See more

    Declaration

    Swift

    public enum ViewportStatus : Hashable
  • ViewportStatusObserver

    ViewportStatusObserver must be implemented by objects that wish to register themselves using addStatusObserver(_:) so that they can observe status changes.

    See also

    addStatusObserver(_:) for an important note about how these notifications are delivered asynchronously.
    See more

    Declaration

    Swift

    public protocol ViewportStatusObserver : AnyObject
  • ViewportStatusChangeReason

    Constants that describe why status changed.

    See more

    Declaration

    Swift

    public struct ViewportStatusChangeReason : Hashable
  • ViewportState

    ViewportState is a protocol that Viewport depends on as it orchestrates transitions to and from different states.

    A ViewportState is a reference type and must not be shared among multiple Viewport instances simultaneously.

    The observeDataSource(with:) method allows ViewportTransitions to consume a stream of camera updates from a target state while executing a transition. startUpdatingCamera() and stopUpdatingCamera() are invoked to tell the state that it should assume or relinquish control of the map’s camera. These are typically used by Viewport itself after a successful transition into a state and when exiting a state, respectively.

    MapboxMaps provides implementations of ViewportState that can be created and configured via methods on Viewport. Applications may also define their own implementations to handle advanced use cases not covered by the provided implementations.

    States should generally pre-warm their data sources as soon as they are created to minimize delays when they become current. For this reason, only states that are currently (or soon-to-be) needed should be kept alive so that unneeded resources (e.g. location services) can be released.

    See also

    • FollowPuckViewportState
    • OverviewViewportState
    See more

    Declaration

    Swift

    public protocol ViewportState : AnyObject
  • FollowPuckViewportState

    A ViewportState implementation that tracks the location puck (to show a puck, use puckType)

    Use makeFollowPuckViewportState(options:) to create instances of this class.

    See more

    Declaration

    Swift

    public final class FollowPuckViewportState
    extension FollowPuckViewportState: ViewportState
  • FollowPuckViewportStateOptions

    Configuration options for FollowPuckViewportState.

    Each of the CameraOptions-related properties is optional, so that the state can be configured to only modify certain aspects of the camera if desired. This can be used, to achieve effects like allowing zoom gestures to work simultaneously with FollowPuckViewportState.

    See also

    transitionsToIdleUponUserInteraction
    See more

    Declaration

    Swift

    public struct FollowPuckViewportStateOptions : Hashable
  • FollowPuckViewportStateBearing

    Expresses the different ways that FollowPuckViewportState can obtain values to use when setting bearing.

    See also

    puckBearing
    See more

    Declaration

    Swift

    public enum FollowPuckViewportStateBearing : Hashable
  • OverviewViewportState

    A ViewportState implementation that shows an overview of the geometry specified by its geometry.

    Use makeOverviewViewportState(options:) to create instances of this class.

    See more

    Declaration

    Swift

    public final class OverviewViewportState
    extension OverviewViewportState: ViewportState
  • OverviewViewportStateOptions

    Configuration options for OverviewViewportState.

    See more

    Declaration

    Swift

    public struct OverviewViewportStateOptions : Equatable
  • ViewportTransition

    ViewportTransition is a protocol that Viewport depends on as it orchestrates transitions to and from different ViewportStates.

    MapboxMaps provides implementations of ViewportTransition that can be created and configured via methods on Viewport. Applications may also define their own implementations to handle advanced use cases not covered by the provided implementations.

    See also

    • DefaultViewportTransition
    • ImmediateViewportTransition
    See more

    Declaration

    Swift

    public protocol ViewportTransition : AnyObject
  • DefaultViewportTransition

    A default ViewportTransition implementation.

    Use makeDefaultViewportTransition(options:) to create instances of this class.

    See more

    Declaration

    Swift

    public final class DefaultViewportTransition
    extension DefaultViewportTransition: ViewportTransition
  • DefaultViewportTransitionOptions

    Configuration options for DefaultViewportTransition.

    See more

    Declaration

    Swift

    public struct DefaultViewportTransitionOptions : Hashable
  • ImmediateViewportTransition

    A ViewportTransition implementation that transitions immediately without any animation.

    Use makeImmediateViewportTransition() to create instances of this class.

    Declaration

    Swift

    public final class ImmediateViewportTransition : ViewportTransition

© 2023 Mapbox. All rights reserved. (Last updated: 2023-11-09)

Generated by jazzy ♪♫ v0.14.2, a Realm project.