Configure marker altitude

Select platform: Android iOS

You can customize the altitude of markers that you add to a 3D map.

Extruded marker on a 3D map

The following code sample demonstrates how use the Marker struct configure the altitude and altitude mode of a marker to extrude it and set its altitude.

Swift

@State var extrudedMarker: Marker = .init(
  position: .init(
      latitude: 37.78980534,
      longitude:  -122.3969349,
      altitude: 50.0),
  altitudeMode: .relativeToGround,
  collisionBehavior: .required,
  extruded: true,
  drawsWhenOccluded: true,
  sizePreserved: true,
  zIndex: 0,
  label: "Extruded marker"
)