Specifies whether to connect the marker to the ground. To extrude a
marker, the altitudeMode must be either relativeToGround,
relativeToMesh or absolute.
Hashes the essential components of this value by feeding them into the
given hasher.
Implement this method to conform to the Hashable protocol. The
components used for hashing must be the same as the components compared
in your type’s == operator implementation. Call hasher.combine(_:)
with each of these components.
Important
In your implementation of hash(into:),
don’t call finalize() on the hasher instance provided,
or replace it with a different instance.
Doing so may become a compile-time error in the future.
Hash values are not guaranteed to be equal across different executions of
your program. Do not save hash values to use during a future execution.
Important
hashValue is deprecated as a Hashable requirement. To
conform to Hashable, implement the hash(into:) requirement instead.
The compiler provides an implementation for hashValue for you.
Specifies whether this marker should preserve its size or not regardless
of distance from camera. By default the marker is scaled based on
distance from camera/tilt.
The zIndex compared to other 3D markers. By default, Markers are
displayed according to their vertical position on screen, with lower
Markersappearing in front ofMarkerfarther up the screen. Note
thatzIndexis also used to help determine relative priority between
CollisionBehavior.optionalAndHidesLowerPriority3D markers. A higher
zIndex` value indicates higher priority.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-21 UTC."],[],[],null,["# GoogleMaps3D Framework Reference\n\nMarker\n======\n\n struct Marker\n\n extension Marker : Copyable, Equatable, Escapable, Hashable, Identifiable, MapContent\n\nA 3D marker that can be placed on a map. \n\n Map(mode: .hybrid) {\n Marker(position: .init(latitude: 37.7749, longitude: -122.4194, altitude: 0))\n }\n\n- `\n ``\n ``\n `\n\n ### [==(_:_:)](#/s:12GoogleMaps3D6MarkerV2eeoiySbAC_ACtFZ)\n\n `\n ` \n Returns a Boolean value indicating whether two values are equal.\n\n Equality is the inverse of inequality. For any values `a` and `b`,\n `a == b` implies that `a != b` is `false`. \n\n #### Declaration\n\n Swift \n\n static func == (a: Marker, b: Marker) -\u003e Bool\n\n- `\n ``\n ``\n `\n\n ### [ID](#/s:12GoogleMaps3D6MarkerV2IDa)\n\n `\n ` \n A type representing the stable identity of the entity associated with\n an instance. \n\n #### Declaration\n\n Swift \n\n @available(watchOS, introduced: 6.0)\n @available(macOS, introduced: 10.15)\n @available(iOS, introduced: 13.0)\n @available(tvOS, introduced: 13.0)\n typealias ID = String\n\n- `\n ``\n ``\n `\n\n ### [add(coordinator:)](#/s:12GoogleMaps3D6MarkerV3add11coordinatoryAA20RenderingCoordinatorC_tF)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n func add(coordinator: RenderingCoordinator)\n\n- `\n ``\n ``\n `\n\n ### [altitudeMode](#/s:12GoogleMaps3D6MarkerV12altitudeModeAA08AltitudeE0Ovp)\n\n `\n ` \n Specifies how altitude in the position is interpreted.\n\n Default value: `clampToGround` \n\n #### Declaration\n\n Swift \n\n var altitudeMode: ../Enums/AltitudeMode.html\n\n- `\n ``\n ``\n `\n\n ### [collisionBehavior](#/s:12GoogleMaps3D6MarkerV17collisionBehaviorAA09CollisionE0Ovp)\n\n `\n ` \n Specifies how a `Marker` should behave when it collides with another\n `Marker` or with the default map labels.\n\n Default value: `required` \n\n #### Declaration\n\n Swift \n\n var collisionBehavior: ../Enums/CollisionBehavior.html\n\n- `\n ``\n ``\n `\n\n ### [drawsWhenOccluded](#/s:12GoogleMaps3D6MarkerV17drawsWhenOccludedSbvp)\n\n `\n ` \n Specifies whether this marker should be drawn or not when it's occluded.\n The marker can be occluded by map geometry (e.g. buildings).\n\n Default value: `clampToGround` \n\n #### Declaration\n\n Swift \n\n var drawsWhenOccluded: Bool\n\n- `\n ``\n ``\n `\n\n ### [extruded](#/s:12GoogleMaps3D6MarkerV8extrudedSbvp)\n\n `\n ` \n Specifies whether to connect the marker to the ground. To extrude a\n marker, the altitudeMode must be either `relativeToGround`,\n `relativeToMesh` or `absolute`.\n\n Default value: `false` \n\n #### Declaration\n\n Swift \n\n var extruded: Bool\n\n- `\n ``\n ``\n `\n\n ### [hash(into:)](#/s:12GoogleMaps3D6MarkerV4hash4intoys6HasherVz_tF)\n\n `\n ` \n Hashes the essential components of this value by feeding them into the\n given hasher.\n\n Implement this method to conform to the `Hashable` protocol. The\n components used for hashing must be the same as the components compared\n in your type's `==` operator implementation. Call `hasher.combine(_:)`\n with each of these components. \n Important\n\n In your implementation of `hash(into:)`,\n don't call `finalize()` on the `hasher` instance provided,\n or replace it with a different instance.\n Doing so may become a compile-time error in the future. \n\n #### Declaration\n\n Swift \n\n func hash(into hasher: inout Hasher)\n\n- `\n ``\n ``\n `\n\n ### [hashValue](#/s:12GoogleMaps3D6MarkerV9hashValueSivp)\n\n `\n ` \n The hash value.\n\n Hash values are not guaranteed to be equal across different executions of\n your program. Do not save hash values to use during a future execution. \n Important\n `hashValue` is deprecated as a `Hashable` requirement. To conform to `Hashable`, implement the [hash(into:)](../Structs/Marker.html#/s:12GoogleMaps3D6MarkerV4hash4intoys6HasherVz_tF) requirement instead. The compiler provides an implementation for `hashValue` for you. \n\n #### Declaration\n\n Swift \n\n var hashValue: Int { get }\n\n- `\n ``\n ``\n `\n\n ### [id](#/s:12GoogleMaps3D6MarkerV2idSSvp)\n\n `\n ` \n Unique identifier \n\n #### Declaration\n\n Swift \n\n let id: String\n\n- `\n ``\n ``\n `\n\n ### [init(position:altitudeMode:collisionBehavior:extruded:drawsWhenOccluded:sizePreserved:zIndex:label:)](#/s:12GoogleMaps3D6MarkerV8position12altitudeMode17collisionBehavior8extruded17drawsWhenOccluded13sizePreserved6zIndex5labelAcA14LatLngAltitudeV_AA0sF0OAA09CollisionH0OS3bs5Int32VSStcfc)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n init(position: ../Structs/LatLngAltitude.html, altitudeMode: ../Enums/AltitudeMode.html = .clampToGround, collisionBehavior: ../Enums/CollisionBehavior.html = .required, extruded: Bool = false, drawsWhenOccluded: Bool = false, sizePreserved: Bool = false, zIndex: Int32 = 0, label: String = \"\")\n\n- `\n ``\n ``\n `\n\n ### [label](#/s:12GoogleMaps3D6MarkerV5labelSSvp)\n\n `\n ` \n Text to be displayed by this marker.\n\n Defaults to empty string. \n\n #### Declaration\n\n Swift \n\n var label: String\n\n- `\n ``\n ``\n `\n\n ### [position](#/s:12GoogleMaps3D6MarkerV8positionAA14LatLngAltitudeVvp)\n\n `\n ` \n Sets the position. \n\n #### Declaration\n\n Swift \n\n var position: ../Structs/LatLngAltitude.html\n\n- `\n ``\n ``\n `\n\n ### [remove(coordinator:)](#/s:12GoogleMaps3D6MarkerV6remove11coordinatoryAA20RenderingCoordinatorC_tF)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n func remove(coordinator: RenderingCoordinator)\n\n- `\n ``\n ``\n `\n\n ### [sizePreserved](#/s:12GoogleMaps3D6MarkerV13sizePreservedSbvp)\n\n `\n ` \n Specifies whether this marker should preserve its size or not regardless\n of distance from camera. By default the marker is scaled based on\n distance from camera/tilt.\n\n Default value: `false` \n\n #### Declaration\n\n Swift \n\n var sizePreserved: Bool\n\n- `\n ``\n ``\n `\n\n ### [update(coordinator:)](#/s:12GoogleMaps3D6MarkerV6update11coordinatoryAA20RenderingCoordinatorC_tF)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n func update(coordinator: RenderingCoordinator)\n\n- `\n ``\n ``\n `\n\n ### [zIndex](#/s:12GoogleMaps3D6MarkerV6zIndexs5Int32Vvp)\n\n `\n ` \n The zIndex compared to other 3D markers. By default, `Markers` are\n displayed according to their vertical position on screen, with lower\n `Markers``appearing in front of`Marker`farther up the screen. Note\n that`zIndex`is also used to help determine relative priority between\n `CollisionBehavior.optionalAndHidesLowerPriority`3D markers. A higher\n `zIndex\\` value indicates higher priority.\n\n Default value: `clampToGround` \n\n #### Declaration\n\n Swift \n\n var zIndex: Int32"]]