Puck2D

@_documentation(visibility: public)
@_spi(Experimental)
public struct Puck2D : PrimitiveMapContent

Displays user location via 2D Puck.

Create the 2D Puck in Map content.

Map {
    Puck2D(bearing: .heading)
        .showsAccuracyRing(true)
}
  • Creates 2D puck.

    Declaration

    Swift

    @_documentation(visibility: public)
    public init(bearing: PuckBearing? = nil)
  • The opacity of the entire location indicator.

    Declaration

    Swift

    @_documentation(visibility: public)
    public func opacity(_ opacity: Double) -> Puck2D
  • Image to use as the top of the location indicator.

    Declaration

    Swift

    @_documentation(visibility: public)
    public func topImage(_ topImage: UIImage?) -> Puck2D
  • Image to use as the middle of the location indicator.

    Declaration

    Swift

    @_documentation(visibility: public)
    public func bearingImage(_ bearingImage: UIImage?) -> Puck2D
  • Image to use as the background of the location indicator.

    Declaration

    Swift

    @_documentation(visibility: public)
    public func shadowImage(_ shadowImage: UIImage?) -> Puck2D
  • The size of the images, as a scale factor applied to the size of the specified image.

    Declaration

    Swift

    @_documentation(visibility: public)
    public func scale(_ scale: Double) -> Puck2D
  • The size of the images, as a scale factor applied to the size of the specified image.

    Declaration

    Swift

    @_documentation(visibility: public)
    public func scale(_ scale: Expression) -> Puck2D
  • Location puck pulsing configuration is pulsing on the map.

    Declaration

    Swift

    @_documentation(visibility: public)
    public func pulsing(_ pulsing: Puck2DConfiguration.Pulsing?) -> Puck2D
  • Flag determining if the horizontal accuracy ring should be shown around the Puck. default value is false

    Declaration

    Swift

    @_documentation(visibility: public)
    public func showsAccuracyRing(_ showsAccuracyRing: Bool) -> Puck2D
  • The color of the accuracy ring.

    Declaration

    Swift

    @_documentation(visibility: public)
    public func accuracyRingColor(_ accuracyRingColor: UIColor) -> Puck2D
  • The color of the accuracy ring border.

    Declaration

    Swift

    @_documentation(visibility: public)
    public func accuracyRingBorderColor(_ accuracyRingBorderColor: UIColor) -> Puck2D