MSFOptions
Objective-C
@interface MSFOptions : NSObject {
void *swigCPtr;
BOOL swigCMemOwn;
}
Swift
class MSFOptions : NSObject
A class containing various options for rendering and map manipulation.
-
Checks if this object is equal to the specified object.
Declaration
Objective-C
- (BOOL)isEqual:(id)object;Swift
func isEqual(_ object: Any!) -> BoolParameters
objectThe reference object.
Return Value
True when objects are equal, false otherwise.
-
Returns the hash value of this object.
Declaration
Objective-C
- (NSUInteger)hash;Swift
func hash() -> UIntReturn Value
The hash value of this object.
-
Sets the ambient light color. Ambient light affects all lighting enabled models in the scene equally, it has no direction or location.
Declaration
Objective-C
- (void)setAmbientLightColor:(MSFColor *)color;Swift
func setAmbientLightColor(_ color: MSFColor!)Parameters
colorThe new color for the ambient light.
-
Sets the color of the main light. The main light affects all lighting enabled models in the scene equally from a certain direction. This light can be used to simulate sun or moon light.
Declaration
Objective-C
- (void)setMainLightColor:(MSFColor *)color;Swift
func setMainLightColor(_ color: MSFColor!)Parameters
colorThe new color for the main light.
-
Sets the direction of the main light. The main light affects all lighting enabled models in the scene equally from a certain direction. This light can be used to simulate sun or moon light. The direction is always measured based on the local tangent frame of the focus point.
Declaration
Objective-C
- (void)setMainLightDirection:(MSFMapVec *)direction;Swift
func setMainLightDirection(_ direction: MSFMapVec!)Parameters
directionThe new direction vector for the main light. (0,0,-1) means straight down, (-0.707,0,-0.707) means from east with a 45 degree angle. The direction vector will be normalized.
-
Returns the render projection mode.
Declaration
Objective-C
- (enum MSFRenderProjectionMode)getRenderProjectionMode;Swift
func getRenderProjectionMode() -> MSFRenderProjectionModeReturn Value
The render projection mode.
-
Sets the render projection mode. The default is RenderProjectionMode::PLANAR.
Declaration
Objective-C
- (void)setRenderProjectionMode: (enum MSFRenderProjectionMode)renderProjectionMode;Swift
func setRenderProjectionMode(_ renderProjectionMode: MSFRenderProjectionMode)Parameters
renderProjectionModeThe new render projection mode.
-
Returns the state of the tile border debug overlay.
Declaration
Objective-C
- (BOOL)isDebugTileBorders;Swift
func isDebugTileBorders() -> BoolReturn Value
True if every tile layer outlines the tiles it draws.
-
Sets the state of the tile border debug overlay. Every tile layer then outlines the tiles it actually draws, in 3D following the terrain, with a colour per zoom level and alternating brightness between neighbours - so a layer using a coarser tile set than the one under it, an overzoomed stand-in, or a tile that owns pixels it should not, is visible on screen. The default is false.
Declaration
Objective-C
- (void)setDebugTileBorders:(BOOL)enabled;Swift
func setDebugTileBorders(_ enabled: Bool)Parameters
enabledThe new state of the tile border debug overlay.
-
Returns the click type detection state.
Declaration
Objective-C
- (BOOL)isClickTypeDetection;Swift
func isClickTypeDetection() -> BoolReturn Value
True if click type detection is enabled.
-
Sets the state of the click type detection flag. If set to true clicks are categorized as normal clicks, double clicks, long clicks and dual clicks. The default is true.
Declaration
Objective-C
- (void)setClickTypeDetection:(BOOL)enabled;Swift
func setClickTypeDetection(_ enabled: Bool)Parameters
enabledThe new state of the click type detection flag.
-
Returns how far a pointer may travel before a press stops counting as a click.
Declaration
Objective-C
- (float)getClickMovingTolerance;Swift
func getClickMovingTolerance() -> FloatReturn Value
The tolerance in density-independent pixels (dp). The default is 32.
-
Sets how far a pointer may travel before a press stops counting as a click and the map starts panning. The default, 32 dp, is a finger-sized threshold; a mouse wants far less (maplibre uses 3 px), which is why a desktop or web host lowers it.
Declaration
Objective-C
- (void)setClickMovingTolerance:(float)tolerance;Swift
func setClickMovingTolerance(_ tolerance: Float)Parameters
toleranceThe new tolerance in density-independent pixels (dp).
-
Returns the double click detection state.
Declaration
Objective-C
- (BOOL)isDoubleClickDetection;Swift
func isDoubleClickDetection() -> BoolReturn Value
True if double click detection is enabled.
-
Sets the state of the double click detection flag. If set to true clicks, then double clicks are detected separately from normal clicks. are categorized as normal clicks, double clicks, The click type resolving takes about 400ms (configurable via setDoubleClickMaxDuration), so for applications that do not require this functionality, it can be turned off. The default is true.
Declaration
Objective-C
- (void)setDoubleClickDetection:(BOOL)enabled;Swift
func setDoubleClickDetection(_ enabled: Bool)Parameters
enabledThe new state of the double click detection flag.
-
Returns the long click duration in seconds.
Declaration
Objective-C
- (float)getLongClickDuration;Swift
func getLongClickDuration() -> FloatReturn Value
The long click duration in seconds.
-
Sets the long click duration in seconds. The default is value is 0.4 (400ms).
Declaration
Objective-C
- (void)setLongClickDuration:(float)duration;Swift
func setLongClickDuration(_ duration: Float)Parameters
durationThe new duration for the long click in seconds.
-
Returns the double click max duration in seconds.
Declaration
Objective-C
- (float)getDoubleClickMaxDuration;Swift
func getDoubleClickMaxDuration() -> FloatReturn Value
The double click max duration in seconds.
-
Sets the double click max in seconds. The default is value is 0.4 (400ms).
Declaration
Objective-C
- (void)setDoubleClickMaxDuration:(float)duration;Swift
func setDoubleClickMaxDuration(_ duration: Float)Parameters
durationThe new value for the double click max duration detection in seconds.
-
Returns the tile size used for drawing map tiles.
Declaration
Objective-C
- (int)getTileDrawSize;Swift
func getTileDrawSize() -> Int32Return Value
The tile size in density-independent pixels (dp).
-
Sets the tile size for drawing map tiles. Different datasources may have different tile sizes, this option can be used to compensate for bigger or smaller tiles than default. The default is 256.
A style’s own sizes do NOT follow it: a vector tile layer decodes against this size, so a label stays the same dp whatever tile the layer picks. Set it before adding the layer - a layer reads it when it joins the map.
Declaration
Objective-C
- (void)setTileDrawSize:(int)tileDrawSize;Swift
func setTileDrawSize(_ tileDrawSize: Int32)Parameters
tileDrawSizeThe new tile size in density-independent pixels (dp).
-
Returns how many zoom levels the camera is offset from the tile-size convention.
Declaration
Objective-C
- (float)getZoomOffset;Swift
func getZoomOffset() -> FloatReturn Value
The zoom offset in levels. The default is 0.
-
Sets how many zoom levels the camera is offset from the tile-size convention.
The SDK calibrates on a 256-pixel tile, maplibre and mapbox-gl on a 512-pixel one, so an offset of 1 adopts theirs. It RENUMBERS and nothing else: label and line sizes do not move with it, which is why it is not just a bigger TileDrawSize. Changing it changes what getZoom() reports, so a stored camera and a visibleZoomRange move with it.
Declaration
Objective-C
- (void)setZoomOffset:(float)offset;Swift
func setZoomOffset(_ offset: Float)Parameters
offsetThe new zoom offset in levels. The default is 0.
-
Returns the factor on the screen size a tile may cover before it is refined.
Declaration
Objective-C
- (float)getTileLODFactor;Swift
func getTileLODFactor() -> FloatReturn Value
The tile LOD factor. The default is 0.5; 1 is exactly tangram’s rule.
-
Sets how big a tile may get on screen before the next zoom level is used, as a factor on tangram’s rule (core/src/tile/tileManager.cpp): refine while the tile’s projected screen area is at least that of a 2x2 block of nominal tiles. A factor of 1 is that rule verbatim, larger keeps tiles coarser (fewer tiles, fewer labels, less detail), smaller refines further. Where it matters is a tilted view: a tile near the horizon collapses to a few pixels of screen while its distance barely grows, so this - not the view distance - is what decides how much of the horizon band is drawn at full detail.
Declaration
Objective-C
- (void)setTileLODFactor:(float)factor;Swift
func setTileLODFactor(_ factor: Float)Parameters
factorThe new tile LOD factor. The default is 0.5.
-
Returns how many distinct zoom levels a tilted view may spread over.
Declaration
Objective-C
- (float)getTileLODMaxZoomLevelsOnScreen;Swift
func getTileLODMaxZoomLevelsOnScreen() -> FloatReturn Value
The zoom levels on screen. The default is 9.314, maplibre’s.
-
Sets how many distinct zoom levels the frame may spread over when the horizon is at the top of the screen - maplibre’s maxZoomLevelsOnScreen (setSourceTileLodParams). It sets how fast the level decays toward the horizon: HIGHER spreads more levels over the frame, so the far field coarsens faster and costs fewer tiles; LOWER keeps far ground finer and costs more. maplibre’s 9.314 is our screen-area rule exactly, so it is the default and changing nothing changes nothing. This supersedes the old TileLODForeshorteningLimit, which bounded the same term from the other side with a number that had no reference behind it.
Declaration
Objective-C
- (void)setTileLODMaxZoomLevelsOnScreen:(float)levels;Swift
func setTileLODMaxZoomLevelsOnScreen(_ levels: Float)Parameters
levelsThe zoom levels on screen. The default is 9.314.
-
Returns how many times more tiles a tilted view may load than a top-down one.
Declaration
Objective-C
- (float)getTileLODTileCountRatio;Swift
func getTileLODTileCountRatio() -> FloatReturn Value
The ratio. The default is 3, maplibre’s.
-
Sets the cap on how many more tiles a tilted view may load than a top-down one - maplibre’s tileCountMaxMinRatio. When the cap would be exceeded the level is lowered uniformly across the frame until it fits. NOTE this binds only when TileLODMaxZoomLevelsOnScreen asks for a gentler far field than the default: at the default the pitched view never counts as asking for more tiles than a flat one, so the cap is inert. It bounds the cost of refining the horizon, it does not rescue a view that is slow for another reason.
Declaration
Objective-C
- (void)setTileLODTileCountRatio:(float)ratio;Swift
func setTileLODTileCountRatio(_ ratio: Float)Parameters
ratioThe ratio. The default is 3.
-
Applies a named set of the tile LOD numbers - TileLODFactor, TileLODMaxZoomLevelsOnScreen, TileLODTileCountRatio and TileStyleZoomLift at once. They multiply into the tile count, so tuning them separately is how a map ends up four times more expensive than any reference renderer without anyone deciding to. Set a profile for the platform, then override one number if a specific map needs it.
Declaration
Objective-C
- (void)setTileLODProfile:(enum MSFTileLODProfile)profile;Swift
func setTileLODProfile(_ profile: MSFTileLODProfile)Parameters
profileThe profile to apply.
-
Returns how many zoom levels above its own a coarsened tile may be styled at.
Declaration
Objective-C
- (int)getTileStyleZoomLift;Swift
func getTileStyleZoomLift() -> Int32Return Value
The lift in zoom levels. The default is 2.
-
Sets how many zoom levels above its own zoom a coarsened tile matches its style rules at. The LOD rule (see setTileLODFactor) hands back a tile coarser than the camera asked for, and a CartoCSS [zoom] filter gates on the TILE, so a converted MapBox style’s
minzoom- a VIEW-zoom gate in the original - stops matching the moment the tile coarsens: one level, and the far half of a tilted view loses every building along a straight tile edge. This lifts the zoom the rules are matched at, without changing which tiles are drawn. It is bounded because a far tile styled at the camera’s zoom emits the whole near-field content - every label, every arrow - over ground tens of times wider. 2 covers the first two coarsening steps, where the visible edge is; 0 restores the tile’s own zoom.Declaration
Objective-C
- (void)setTileStyleZoomLift:(int)levels;Swift
func setTileStyleZoomLift(_ levels: Int32)Parameters
levelsThe lift in zoom levels. The default is 2.
-
Returns the dots per inch value.
Declaration
Objective-C
- (float)getDPI;Swift
func getDPI() -> FloatReturn Value
The dots per inch value.
-
Sets the dots per inch value. This is calculated automatically by the SDK when the MapView is created using the device screen parameters. The purpose of this value is to compensate for very high or low resolution devices, so that the map remains readable.
Declaration
Objective-C
- (void)setDPI:(float)dpi;Swift
func setDPI(_ dpi: Float)Parameters
dpiThe new dots per inch value.
-
Returns the draw distance value.
Declaration
Objective-C
- (float)getDrawDistance;Swift
func getDrawDistance() -> FloatReturn Value
The draw distance value.
-
Sets a new draw distance value. The higher the draw distance the more tiles can be seen, if the map is tilted. Changing the draw distance will cause the horizon to move, which means that the if the sky bitmap is used, the horizon may not match up anymore. Increasing this value will decrease performance and increase network traffic, if online map is used. The default is 16.
Declaration
Objective-C
- (void)setDrawDistance:(float)drawDistance;Swift
func setDrawDistance(_ drawDistance: Float)Parameters
drawDistanceThe new draw distance value.
-
Returns the vertial field of view angle.
Declaration
Objective-C
- (int)getFieldOfViewY;Swift
func getFieldOfViewY() -> Int32Return Value
The vertical field of view angle in degrees.
-
Sets the vertial field of view angle. Larger values increase the viewable area, at the cost of performance and additional perspective distortion. The default is 70.
Declaration
Objective-C
- (void)setFieldOfViewY:(int)fovY;Swift
func setFieldOfViewY(_ fovY: Int32)Parameters
fovYThe new vertical field of view angle in degrees.
-
Returns the panning mode.
Declaration
Objective-C
- (enum MSFPanningMode)getPanningMode;Swift
func getPanningMode() -> MSFPanningModeReturn Value
The panning mode.
-
Sets the panning mode. The default is PanningMode::FREE.
Declaration
Objective-C
- (void)setPanningMode:(enum MSFPanningMode)panningMode;Swift
func setPanningMode(_ panningMode: MSFPanningMode)Parameters
panningModeThe new panning mode.
-
Returns the pivot mode.
Declaration
Objective-C
- (enum MSFPivotMode)getPivotMode;Swift
func getPivotMode() -> MSFPivotModeReturn Value
The pivot mode.
-
Sets the pivot mode. The default is PIVOT_MODE_TOUCHPOINT
Declaration
Objective-C
- (void)setPivotMode:(enum MSFPivotMode)pivotMode;Swift
func setPivotMode(_ pivotMode: MSFPivotMode)Parameters
pivotModeThe new pivot mode.
-
Returns the state of seamless horizontal panning flag.
Declaration
Objective-C
- (BOOL)isSeamlessPanning;Swift
func isSeamlessPanning() -> BoolReturn Value
True if seamless horizontal panning is enabled.
-
Sets the state of seamless horizontal panning flag. If set to true, the user can scroll seamlessly from the left side of the map to the right, and the other way around. The default is true.
Declaration
Objective-C
- (void)setSeamlessPanning:(BOOL)enabled;Swift
func setSeamlessPanning(_ enabled: Bool)Parameters
enabledThe new state of seamless horizontal panning flag.
-
Returns the state of the restricted panning flag.
Declaration
Objective-C
- (BOOL)isRestrictedPanning;Swift
func isRestrictedPanning() -> BoolReturn Value
True if restricted panning is enabled.
-
Sets the restricted panning flag. If set to true, then focus point coordinates and zoom level of the map view will be adjusted to display as little empty background as possible. The default is false.
Declaration
Objective-C
- (void)setRestrictedPanning:(BOOL)enabled;Swift
func setRestrictedPanning(_ enabled: Bool) -
Returns true if tilting gesture direction is reversed (and same as with Google Maps).
Declaration
Objective-C
- (BOOL)isTiltGestureReversed;Swift
func isTiltGestureReversed() -> BoolReturn Value
True if tilting gesture direction is reversed (and same as with Google Maps). Otherwise returns false.
-
Sets the tilting gesture direction. By default, the gesture is not reversed.
Declaration
Objective-C
- (void)setTiltGestureReversed:(BOOL)reversed;Swift
func setTiltGestureReversed(_ reversed: Bool)Parameters
reversedTrue if Google Maps compatible mode should be used. False otherwise (default).
-
Returns the state of zoom gestures.
Declaration
Objective-C
- (BOOL)isZoomGestures;Swift
func isZoomGestures() -> BoolReturn Value
True if zoom gestures are enabled. False otherwise.
-
Sets the zoom gestures flag. Zoom gestures allow to use double click and dual click to zoom in/out of the map. Enabled by default. Note that zoom gestures require that click detection mode is enabled and also that double click detection is enabled.
Declaration
Objective-C
- (void)setZoomGestures:(BOOL)enabled;Swift
func setZoomGestures(_ enabled: Bool)Parameters
enabledTrue if zoom gestured should be enabled, false otherwise.
-
Returns the state of rotation gestures.
Declaration
Objective-C
- (BOOL)isRotationGestures;Swift
func isRotationGestures() -> BoolReturn Value
True if rotation gestures are enabled. False otherwise.
-
Sets the rotation gestures flag. Rotation gestures allow to use pinch to rotate the map. By default, rotation gestures are not enabled.
Declaration
Objective-C
- (void)setRotationGestures:(BOOL)enabled;Swift
func setRotationGestures(_ enabled: Bool)Parameters
enabledTrue if rotation gestured should be enabled, false otherwise.
-
Returns the number of threads used by the envelope task pool.
Declaration
Objective-C
- (int)getEnvelopeThreadPoolSize;Swift
func getEnvelopeThreadPoolSize() -> Int32Return Value
The envelope task thread pool size.
-
Sets the number of threads used by the envelope task pool. More threads means more envelope tasks are executed in parallel. This might speed up the data query, but may cause performance drops. Default is 1.
Declaration
Objective-C
- (void)setEnvelopeThreadPoolSize:(int)poolSize;Swift
func setEnvelopeThreadPoolSize(_ poolSize: Int32)Parameters
poolSizeThe new envelope task thread pool size.
-
Returns the number of threads used by the tile task pool.
Declaration
Objective-C
- (int)getTileThreadPoolSize;Swift
func getTileThreadPoolSize() -> Int32Return Value
The tile task thread pool size.
-
Sets the number of threads used by the tile task pool. More threads means more tile tasks are executed in parallel. This might speed up the data query, but may cause performance drops. Default is 1.
Declaration
Objective-C
- (void)setTileThreadPoolSize:(int)poolSize;Swift
func setTileThreadPoolSize(_ poolSize: Int32)Parameters
poolSizeThe new tile task thread pool size.
-
Sets the sky color. The purpose of the sky bitmap is to fill out the empty space visible at low tilt angles.
Declaration
Objective-C
- (void)setSkyColor:(MSFColor *)color;Swift
func setSkyColor(_ color: MSFColor!)Parameters
colorThe new sky color. If the color is transparent, sky is not rendered.
-
Sets the background bitmap. The purpose of the background bitmap is to fill out the empty space when there’s no map data visible. The bitmap will get scaled and repeated to cover the hole visible area. If a null pointer is passed, the background won’t be drawn. The width and height of the bitmap must be power of two (for example: 256 * 256 or 128 * 512). It’s also preferred if the bitmap was square (width == height), but this is not a requirement. The default is “default_background.png”.
Declaration
Objective-C
- (void)setBackgroundBitmap:(MSFBitmap *)backgroundBitmap;Swift
func setBackgroundBitmap(_ backgroundBitmap: MSFBitmap!)Parameters
backgroundBitmapThe new background bitmap.
-
Returns the state of the user input flag.
Declaration
Objective-C
- (BOOL)isUserInput;Swift
func isUserInput() -> BoolReturn Value
True if user input is allowed.
-
Sets the state of the user input flag. If set to false the user won’t be able to pan the map using touch controls, programmatic map panning using MapView methods is still possible. The default is false.
Declaration
Objective-C
- (void)setUserInput:(BOOL)enabled;Swift
func setUserInput(_ enabled: Bool)Parameters
enabledThe new state of the user input flag.
-
Returns the panning speed mode.
Declaration
Objective-C
- (enum MSFPanningSpeedMode)getPanningSpeedMode;Swift
func getPanningSpeedMode() -> MSFPanningSpeedModeReturn Value
The panning speed mode.
-
Sets how fast a one-finger pan moves the map on a tilted view. The default is PANNING_SPEED_MODE_ANCHORED, which keeps the speed a gesture starts with for as long as it lasts; PANNING_SPEED_MODE_MAP is the exact grab-the-world pan, which changes speed as the finger moves between near and far parts of the screen.
Declaration
Objective-C
- (void)setPanningSpeedMode:(enum MSFPanningSpeedMode)mode;Swift
func setPanningSpeedMode(_ mode: MSFPanningSpeedMode)Parameters
modeThe new panning speed mode.
-
Returns the free roam mode.
Declaration
Objective-C
- (enum MSFFreeRoamMode)getFreeRoamMode;Swift
func getFreeRoamMode() -> MSFFreeRoamModeReturn Value
The free roam mode.
-
Sets the free roam mode: what a one-finger drag does, and which camera model the tilt and the rotation follow. Free roam is what makes content placed in the sky (CelestialLayer) reachable, since it is normally off the top of the screen. To look ABOVE the horizon the tilt range has to allow a negative tilt - e.g. setTiltRange(MapRange(-90, 90)) - as it stops at the horizon by default. The default is FREE_ROAM_MODE_OFF.
Declaration
Objective-C
- (void)setFreeRoamMode:(enum MSFFreeRoamMode)mode;Swift
func setFreeRoamMode(_ mode: MSFFreeRoamMode)Parameters
modeThe new free roam mode.
-
Returns how fast a free roam drag turns the view.
Declaration
Objective-C
- (float)getFreeRoamLookSensitivity;Swift
func getFreeRoamLookSensitivity() -> FloatReturn Value
The turn in degrees per inch of drag.
-
Sets how fast a free roam drag turns the view, in degrees per inch of drag. The default is 90, i.e. an inch of drag turns a quarter turn.
Declaration
Objective-C
- (void)setFreeRoamLookSensitivity:(float)degreesPerInch;Swift
func setFreeRoamLookSensitivity(_ degreesPerInch: Float)Parameters
degreesPerInchThe turn in degrees per inch of drag.
-
Returns how far a first person move drag travels.
Declaration
Objective-C
- (float)getFreeRoamMoveSpeed;Swift
func getFreeRoamMoveSpeed() -> FloatReturn Value
The distance per inch of drag, as a fraction of the camera to focus distance.
-
Sets how far a two-finger move travels in FREE_ROAM_MODE_FIRST_PERSON, per inch of drag, as a fraction of the distance from the camera to its focus point - so a move covers the same part of the view at any zoom. The default is 0.5.
Declaration
Objective-C
- (void)setFreeRoamMoveSpeed:(float)distancePerInch;Swift
func setFreeRoamMoveSpeed(_ distancePerInch: Float)Parameters
distancePerInchThe distance per inch of drag.
-
Returns the state of the kinetic panning flag.
Declaration
Objective-C
- (BOOL)isKineticPan;Swift
func isKineticPan() -> BoolReturn Value
True if kinetic panning is enabled.
-
Sets the state of the kinetic panning flag. Kinetic panning allows the map to pan automatically using the inertia of the last swipe, after the user has finished interacting with the touch screen. Default is true.
Declaration
Objective-C
- (void)setKineticPan:(BOOL)enabled;Swift
func setKineticPan(_ enabled: Bool)Parameters
enabledThe new state of the kinetic panning flag.
-
Returns the state of the kinetic rotation flag.
Declaration
Objective-C
- (BOOL)isKineticRotation;Swift
func isKineticRotation() -> BoolReturn Value
True if kinetic rotation is enabled.
-
Sets the state of the kinetic rotation flag. Kinetic rotation allows the map to rotate automatically using the inertia of the last swipe, after the user has finished interacting with the touch screen. Default is true.
Declaration
Objective-C
- (void)setKineticRotation:(BOOL)enabled;Swift
func setKineticRotation(_ enabled: Bool)Parameters
enabledThe new state of the kinetic rotation flag.
-
Returns the state of kinetic zoom flag.
Declaration
Objective-C
- (BOOL)isKineticZoom;Swift
func isKineticZoom() -> BoolReturn Value
True if kinetic zooming is enabled.
-
Sets the state of the kinetic zooming flag. Kinetic zooming allows the map to zoom automatically using the inertia of the last swipe, after the user has finished interacting with the touch screen. Default is true.
Declaration
Objective-C
- (void)setKineticZoom:(BOOL)enabled;Swift
func setKineticZoom(_ enabled: Bool)Parameters
enabledThe new state of the kinetic zooming flag.
-
Returns the state of the map rotatability flag.
Declaration
Objective-C
- (BOOL)isRotatable;Swift
func isRotatable() -> BoolReturn Value
True if map rotating is enabled.
-
Sets the state of the map rotatability flag. If set to false the map can’t be rotated by any means. The default is true.
Declaration
Objective-C
- (void)setRotatable:(BOOL)enabled;Swift
func setRotatable(_ enabled: Bool)Parameters
enabledThe new state of the map rotatability flag.
-
Returns the tilt range constraint.
Return Value
The tilt range constraint in degrees.
-
Sets the tilt range constraint. This will limit the tilt angle of the camera to the specified range. The current tilt angle will remain unaffected, until the next time the tilt angle changes. The minimum tilt angle is -90 degrees and the maximum is 90 degrees. Values that are out of range will be clamped. The default value is MapRange(0, 90). A NEGATIVE tilt looks above the horizon: the camera stays where it is and the view pitches up, which is what an application showing the sky needs. It is opt-in, as the default range stops at the horizon.
Declaration
Objective-C
- (void)setTiltRange:(MSFMapRange *)tiltRange;Swift
func setTiltRange(_ tiltRange: MSFMapRange!)Parameters
tiltRangeThe new tilt range constraint in degrees.
-
Returns the zoom range constraint.
Return Value
The zoom range constraint.
-
Sets the zoom range constraint. This will limit the zoom level of the camera to the specified range. The current zoom level will remain unaffected, until the next time the zoom level changes. The minimum zoom value is 0 and the maximum is 24. Values that are out of range will be clamped. The default value is MapRange(0, 24).
Declaration
Objective-C
- (void)setZoomRange:(MSFMapRange *)zoomRange;Swift
func setZoom(_ zoomRange: MSFMapRange!)Parameters
zoomRangeThe new zoom range constraint.
-
Returns the map panning bounds constraints. Map bounds minimum and maximum points are in the base projection’s coordinate system.
Return Value
The map bounds constraints.
-
Sets the map panning bounds constraints. This will limit camera movement to the specified bounds. The current camera position will remain unaffected, until the next time camera position changes. Map bounds minimum and maximum points are expected to be in the base projection’s coordinate system. If the bounds are larger than the world size, they will be clamped to world bounds. The default value covers the whole world.
Declaration
Objective-C
- (void)setPanBounds:(MSFMapBounds *)panBounds;Swift
func setPanBounds(_ panBounds: MSFMapBounds!)Parameters
panBoundsThe new map bounds constraints.
-
Returns the focus point offset (from screen center) in pixels.
Declaration
Objective-C
- (MSFScreenPos *)getFocusPointOffset;Swift
func getFocusPointOffset() -> MSFScreenPos!Return Value
The focus point offset in pixels.
-
Sets the focus point offset (from screen center) in pixels.
Declaration
Objective-C
- (void)setFocusPointOffset:(MSFScreenPos *)offset;Swift
func setFocusPointOffset(_ offset: MSFScreenPos!)Parameters
offsetThe new focus point offset in pixels.
-
Returns the base projection.
Declaration
Objective-C
- (MSFProjection *)getBaseProjection;Swift
func getBaseProjection() -> MSFProjection!Return Value
The base projection.
-
Sets the base projection. All MapView, MapEventListener and Options methods use the coordinate system of this projection. For example, if base projection is set to EPSG3857 then MapView::getFocusPos returns the coordinates in the EPSG3857 coordinate system, The same applies to setter methods like MapView::setFocusPos which expect the input coordinates to be in the base projection’s coordinate system. The default is EPSG3857.
Declaration
Objective-C
- (void)setBaseProjection:(MSFProjection *)baseProjection;Swift
func setBaseProjection(_ baseProjection: MSFProjection!)Parameters
baseProjectionThe new base projection.
-
Returns the terrain options. May be null if no terrain is configured.
Declaration
Objective-C
- (MSFTerrainOptions *)getTerrainOptions;Swift
func getTerrainOptions() -> MSFTerrainOptions!Return Value
The terrain options.
-
Sets the terrain options. When set, 3D terrain is rendered using the elevation data source of the terrain options. Note that terrain is currently only supported with the PLANAR render projection mode. Setting null disables terrain. Note: this feature is experimental and may change in future SDK versions.
Declaration
Objective-C
- (void)setTerrainOptions:(MSFTerrainOptions *)terrainOptions;Swift
func setTerrain(_ terrainOptions: MSFTerrainOptions!)Parameters
terrainOptionsThe new terrain options. Can be null.
-
Returns the sky options. May be null.
Declaration
Objective-C
- (MSFSkyOptions *)getSkyOptions;Swift
func getSkyOptions() -> MSFSkyOptions!Return Value
The sky options.
-
Sets the sky options. Attaching a SkyOptions object replaces the legacy sky bitmap band with a full-screen shader sky. Pass a null pointer to go back to the legacy sky.
Declaration
Objective-C
- (void)setSkyOptions:(MSFSkyOptions *)skyOptions;Swift
func setSky(_ skyOptions: MSFSkyOptions!)Parameters
skyOptionsThe new sky options.
-
Returns the fog (atmosphere) options. May be null.
Declaration
Objective-C
- (MSFFogOptions *)getFogOptions;Swift
func getFogOptions() -> MSFFogOptions!Return Value
The fog options.
-
Sets the fog options - the haze distant ground fades into and the colours it carries into the sky. Setting null, or leaving the fog color transparent, means no fog.
Declaration
Objective-C
- (void)setFogOptions:(MSFFogOptions *)fogOptions;Swift
func setFog(_ fogOptions: MSFFogOptions!)Parameters
fogOptionsThe new fog options. Can be null.
-
Returns the light (sun) options. May be null.
Declaration
Objective-C
- (MSFLightOptions *)getLightOptions;Swift
func getLightOptions() -> MSFLightOptions!Return Value
The light options.
-
Sets the light (sun) options. The sun direction drives the shader sky, terrain surface lighting and shadows.
Declaration
Objective-C
- (void)setLightOptions:(MSFLightOptions *)lightOptions;Swift
func setLight(_ lightOptions: MSFLightOptions!)Parameters
lightOptionsThe new light options.
-
Sets wether layers are processed in reversed order to process labels. The default is true.
Declaration
Objective-C
- (void)setLayersLabelsProcessedInReverseOrder:(BOOL)enabled;Swift
func setLayersLabelsProcessedInReverseOrder(_ enabled: Bool)Parameters
enabledwether to process layers in reversed order.
-
Returns wether layers are processed in reversed order to process labels.
Declaration
Objective-C
- (BOOL)isLayersLabelsProcessedInReverseOrder;Swift
func isLayersLabelsProcessedInReverseOrder() -> BoolReturn Value
True if layers are processed in reversed order.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()