MapOptions
extension MapOptions
-
init(constrainMode:viewportMode:orientation:crossSourceCollisions:optimizeForTerrain:size:pixelRatio:glyphsRasterizationOptions:)Initialize a
MapOptionsobject that is used when initializing a Map.For initializing a
MapViewplease seeMapInitOptions, andMapOptions.defaultfor a convenient object that can be used in conjunction.Declaration
Swift
public convenience init(constrainMode: ConstrainMode = .heightOnly, viewportMode: ViewportMode = .default, orientation: NorthOrientation = .upwards, crossSourceCollisions: Bool = true, optimizeForTerrain: Bool = true, size: CGSize? = nil, pixelRatio: CGFloat = UIScreen.main.nativeScale, glyphsRasterizationOptions: GlyphsRasterizationOptions = GlyphsRasterizationOptions(fontFamilies: []))Parameters
constrainModeThe map constrain mode; default is
.heightOnly.viewportModeThe viewport mode; default is
.default.orientationThe view orientation; default is
.upwards.crossSourceCollisionsWhether cross-source symbol collision detection should be enabled; default is
truesizeSize of the map, if nil (the default), a minimal default size will be used.
pixelRatioPixel scale of the map view; default is the main screen’s native scale.
glyphsRasterizationOptionsA
GlyphsRasterizationOptionsobject. -
Specifies whether cross-source symbol collision detection should be enabled. Default is
true.Declaration
Swift
public var crossSourceCollisions: Bool { get } -
With terrain on, if
true, the map will render for performance priority, which may lead to layer reordering allowing to maximize performance (layers that are draped over terrain will be drawn first, including fill, line, background, hillshade and raster). Any layers that are positioned after symbols are draped last, over symbols. Otherwise, if set tofalse, the map will always be drawn for layer order priority.By default, it is set to true.
Declaration
Swift
public var optimizeForTerrain: Bool { get } -
The size of the map object and renderer backend. For Apple platforms this is specified with points (or device-independent pixel units). Other platforms, such as Android, use screen pixel units.
For MapView usage, this can be left as nil, since view resizing will ensure the correct size is updated.
Declaration
Swift
public var size: CGSize? { get } -
Undocumented
Declaration
Swift
public override func isEqual(_ object: Any?) -> Bool -
Undocumented
Declaration
Swift
open override var hash: Int { get }
MapOptions Extension Reference