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
MapboxMapwill automatically switch projection fromMapProjection.mercatortoMapProjection.globeor vice-versa ifMapboxMap.setMapProjectionwas configured to useMapProjection.globe.If
MapboxMapis usingMapProjection.globeand current map zoom level is >=GlobeMapProjection.transitionZoomLevel- map will useMapProjection.mercatorandMapboxMap.getMapProjectionwill returnMapProjection.mercator.If
MapboxMapis usingMapProjection.globeand current map zoom level is <GlobeMapProjection.transitionZoomLevel- map will useMapProjection.globeandMapboxMap.getMapProjectionwill returnMapProjection.globe.If
MapboxMapis usingMapProjection.mercator- map will useMapProjection.mercatorfor any zoom level andMapboxMap.getMapProjectionwill returnMapProjection.mercator.Declaration
Swift
public static let transitionZoomLevel: CGFloat
GlobeMapProjection Structure Reference