Focus

public struct Focus : Codable

Focus holds the properties of values to be set when focus on is called

  • An array of MPINodes

    Declaration

    Swift

    public var nodes: [MPINode]?
  • An array of MPIPolygons

    Declaration

    Swift

    public var polygons: [MPIPolygon]?
  • Duration of focus on

    Declaration

    Swift

    public var duration: Double?
  • Whether it should change zoom

    Declaration

    Swift

    public var changeZoom: Bool?
  • Set the minimum zoom level

    Declaration

    Swift

    public var minZoom: Double?
  • Set the tilt

    Declaration

    Swift

    public var tilt: Double?
  • Set the focus on padding for top, bottom, left, right

    Declaration

    Swift

    public var padding: FocusPadding?
  • Set the factor of the focus zoom

    Declaration

    Swift

    public var focusZoomFactor: Double?
  • Construct a MPIOptions.Focus object with the given properties

    Declaration

    Swift

    public init(
        nodes: [MPINode]? = nil,
        polygons: [MPIPolygon]? = nil,
        duration: Double? = nil,
        changeZoom: Bool? = nil,
        minZoom: Double? = nil,
        tilt: Double? = nil,
        padding: FocusPadding? = nil,
        focusZoomFactor: Double? = nil
    )

    Parameters

    nodes

    an array of nodes

    polygons

    an array of polygons

    duration

    duration of focus on

    changeZoom

    whether to change zoom

    minZoom

    minimum zoom level

    tilt

    tilt

    padding

    focus on padding for top, bottom, left, right

    focusZoomFactor

    set the focus zoom factor