# Configuration

    struct Configuration

A configuration that defines the visual properties of a Pin.
This type can be used with the `https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Marker.html` or `https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Marker3D.html` types to customize the appearance of a
pin-style marker.

Example usage:

    // Create a pin with a red background, black border, and default inner circle glyph.
    let redPin = Pin.Configuration(backgroundColor: .red, borderColor: .black)

    // Create a pin with a green background and a custom image glyph.
    let glyphPin = Pin.Configuration(backgroundColor: .green) {
        Image(systemName: "leaf.fill")
            .resizable()
            .scaledToFit()
            .padding(2)
            .foregroundStyle(.white)
    }

    // Use with Marker3D style:
    Marker3D(position: .init(latitude: 0, longitude: 0), style: .pin(redPin))
    Marker3D(position: .init(latitude: 0, longitude: 0), style: .pin(glyphPin))
    Marker3D(position: .init(latitude: 0, longitude: 0), style: .pin(.red))

    // Use with Marker style:
    Marker(position: .init(latitude: 0, longitude: 0)) {
        Pin(configuration: redPin)
    }
    Marker(position: .init(latitude: 0, longitude: 0)) {
        Pin(configuration: glyphPin)
    }
    Marker(position: .init(latitude: 0, longitude: 0)) {
        Pin(configuration: .red)
    }

- `


  ### [backgroundColor](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Pin/Configuration#/s:12GoogleMaps3D3PinV13ConfigurationV15backgroundColor7SwiftUI0F0Vvp)


  `

  #### Declaration

  Swift

      let backgroundColor: Color

- `


  ### [borderColor](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Pin/Configuration#/s:12GoogleMaps3D3PinV13ConfigurationV11borderColor7SwiftUI0F0Vvp)


  `

  #### Declaration

  Swift

      let borderColor: Color

- `


  ### [init(backgroundColor:borderColor:scale:glyph:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Pin/Configuration#/s:12GoogleMaps3D3PinV13ConfigurationV15backgroundColor06borderF05scale5glyphAE7SwiftUI0F0V_ALSfxyXEtcAJ4ViewRzlufc)


  ` Creates a new Pin configuration.

  Use this configuration to customize the appearance of a Marker3D created with the `.pin` style.

  Custom Glyph can be created by passing a custom view

      Pin.Configuration {
          Text("String")
          .minimumScaleFactor(0.01)
      }
      Pin.Configuration {
          Image(systemName: "plus")
              .resizable()
              .scaledToFit()
      }

  #### Declaration

  Swift

      init<GlyphView>(backgroundColor: Color = Color(red: 0.917, green: 0.262, blue: 0.207), borderColor: Color = Color(red: 0.772, green: 0.133, blue: 0.121), scale: Float = 1.0, @ViewBuilder glyph: () -> GlyphView) where GlyphView : View

  #### Parameters

  |---|---|
  | ` backgroundColor ` | The background `Color` of the pin. Defaults to a custom dark red color. |
  | ` borderColor ` | The border `Color` of the pin. Defaults to a custom red color. |
  | ` scale ` | The scale factor to apply to the pin. Defaults to `1.0`. |
  | ` glyph ` | A `ViewBuilder` closure providing the Marker3D glyph's view for a snapshot. The view is constrained to a 15x15 pixel container. |

- `


  ### [init(backgroundColor:borderColor:scale:innerCircleColor:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Pin/Configuration#/s:12GoogleMaps3D3PinV13ConfigurationV15backgroundColor06borderF05scale011innerCircleF0AE7SwiftUI0F0V_ALSfALtcfc)


  ` Creates a new Marker3D configuration.

  Use this configuration to customize the appearance of a Marker3D created with the `.pin` style.

  #### Declaration

  Swift

      init(backgroundColor: Color = Color(red: 0.917, green: 0.262, blue: 0.207), borderColor: Color = Color(red: 0.772, green: 0.133, blue: 0.121), scale: Float = 1.0, innerCircleColor: Color = Color(red: 0.702, green: 0.078, blue: 0.071))

  #### Parameters

  |---|---|
  | ` backgroundColor ` | The background `Color` of the pin. Defaults to a custom dark red color |
  | ` borderColor ` | The border `Color` of the pin. Defaults to a custom red color. |
  | ` scale ` | The scale factor to apply to the pin. Defaults to `1.0`. |
  | ` innerCircleColor ` | Color of pin's inner circle. Defaults to a custom dark red color. |

- `


  ### [red](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Pin/Configuration#/s:12GoogleMaps3D3PinV13ConfigurationV3redAEvpZ)


  ` Google red Marker3D configuration.

  #### Declaration

  Swift

      static var red: https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Pin.html.Configuration { get }

  #### Return Value

  A `Pin.Configuration` instance configured as a red pin.
- `


  ### [scale](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Pin/Configuration#/s:12GoogleMaps3D3PinV13ConfigurationV5scaleSfvp)


  `

  #### Declaration

  Swift

      let scale: Float