GlobeMapProjection
@_spi(Experimental)
public struct GlobeMapProjection : Codable, Hashable
Globe projection is a custom map projection mode for rendering the map wrapped around a full 3D globe. Conceptually it is the undistorted and unskewed “ground truth” view of the map that preserves true proportions between different areas of the map.
Some layers are not supported when map is in Globe projection:
- custom
- fill extrusion
- location indicator
If Globe projection is set it will be switched automatically to Mercator projection
when passing GlobeMapProjection.transitionZoomLevel
during zooming in.
See GlobeMapProjection.transitionZoomLevel
for more details what projection will be used depending on current zoom level.
-
Undocumented
Declaration
Swift
public let name: String
-
Undocumented
Declaration
Swift
public init()
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Zoom level threshold where
MapboxMap
will automatically switch projection fromMapProjection.mercator
toMapProjection.globe
or vice-versa ifMapboxMap.setMapProjection
was configured to useMapProjection.globe
.If
MapboxMap
is usingMapProjection.globe
and current map zoom level is >=GlobeMapProjection.transitionZoomLevel
- map will useMapProjection.mercator
andMapboxMap.getMapProjection
will returnMapProjection.mercator
.If
MapboxMap
is usingMapProjection.globe
and current map zoom level is <GlobeMapProjection.transitionZoomLevel
- map will useMapProjection.globe
andMapboxMap.getMapProjection
will returnMapProjection.globe
.If
MapboxMap
is usingMapProjection.mercator
- map will useMapProjection.mercator
for any zoom level andMapboxMap.getMapProjection
will returnMapProjection.mercator
.Declaration
Swift
public static let transitionZoomLevel: CGFloat