Style
struct StyleDefines the visual style and content of a Marker3D.
-
The default Marker3D style.
Returns: A standard, pre-configured Marker3D appearance provided by the SDK,
Declaration
Swift
static var `default`: Marker3D.Style { get } -
Creates a Marker3D from a custom SwiftUI
Image.The provided image will be rendered as the Marker3D’s content.
Declaration
Swift
static func image(_ image: Image) -> Marker3D.StyleParameters
imageThe SwiftUI
Imageto use for the Marker3D.Return Value
A
Marker3D.Styleinstance based on the image. -
Creates a pin-style Marker3D with the specified visual configuration.
This style renders a standard map pin shape, customized with your provided colors, scale, and an optional glyph.
Parameters
configurationA
Pin.Configurationobject defining the pin’s appearance.Return Value
A
Marker3D.Styleinstance configured as a pin. -
Creates a Marker3D by taking a snapshot of a custom SwiftUI
View.This allows for highly customizable Marker3Ds using any combination of SwiftUI views. The view hierarchy is rendered into an image and used as the Marker3D’s texture.
Example:
.viewSnapshot { VStack { Image(systemName: "star.fill") .foregroundStyle(.yellow) Text("Favorite") .font(.caption) } .padding(8) .background(.blue, in: .capsule) }Declaration
Swift
static func viewSnapshot<V>(@ViewBuilder _ content: () -> V) -> Marker3D.Style where V : ViewParameters
contentA
ViewBuilderclosure that returns the view to be rendered into a snapshot as the Marker3D.Return Value
A
Marker3D.Styleinstance based on a snapshot of the view.