Puck2D

 @_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

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

     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

     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

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

    Declaration

    Swift

     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

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

    Declaration

    Swift

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

    Declaration

    Swift

     public func accuracyRingBorderColor(_ accuracyRingBorderColor: UIColor) -> Puck2D