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!) -> Bool

    Parameters

    object

    The 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() -> UInt

    Return Value

    The hash value of this object.

  • Returns the color of the ambient light.

    Declaration

    Objective-C

    - (MSFColor *)getAmbientLightColor;

    Swift

    func getAmbientLightColor() -> MSFColor!

    Return Value

    The color of the ambient light.

  • 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

    color

    The new color for the ambient light.

  • Returns the color of the main light.

    Declaration

    Objective-C

    - (MSFColor *)getMainLightColor;

    Swift

    func getMainLightColor() -> MSFColor!

    Return Value

    The color of the main 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

    color

    The new color for the main light.

  • Returns the direction of the main light.

    Declaration

    Objective-C

    - (MSFMapVec *)getMainLightDirection;

    Swift

    func getMainLightDirection() -> MSFMapVec!

    Return Value

    The direction of 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

    direction

    The 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() -> MSFRenderProjectionMode

    Return 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

    renderProjectionMode

    The new render projection mode.

  • Returns the state of the tile border debug overlay.

    Declaration

    Objective-C

    - (BOOL)isDebugTileBorders;

    Swift

    func isDebugTileBorders() -> Bool

    Return Value

    True if every tile layer outlines the tiles it draws.

  • Sets the state of the tile border debug overlay: every tile layer outlines the tiles it draws, following the terrain in 3D, with a colour per zoom level. The default is false.

    Declaration

    Objective-C

    - (void)setDebugTileBorders:(BOOL)enabled;

    Swift

    func setDebugTileBorders(_ enabled: Bool)

    Parameters

    enabled

    The new state of the tile border debug overlay.

  • Returns the click type detection state.

    Declaration

    Objective-C

    - (BOOL)isClickTypeDetection;

    Swift

    func isClickTypeDetection() -> Bool

    Return 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

    enabled

    The 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() -> Float

    Return 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

    tolerance

    The new tolerance in density-independent pixels (dp).

  • Returns the double click detection state.

    Declaration

    Objective-C

    - (BOOL)isDoubleClickDetection;

    Swift

    func isDoubleClickDetection() -> Bool

    Return Value

    True if double click detection is enabled.

  • Sets the state of the double click detection flag. If set to true, double clicks are detected separately from normal clicks. Resolving the click type takes about 400ms (see setDoubleClickMaxDuration), so apps that don’t need it can turn it off. The default is true.

    Declaration

    Objective-C

    - (void)setDoubleClickDetection:(BOOL)enabled;

    Swift

    func setDoubleClickDetection(_ enabled: Bool)

    Parameters

    enabled

    The new state of the double click detection flag.

  • Returns the long click duration in seconds.

    Declaration

    Objective-C

    - (float)getLongClickDuration;

    Swift

    func getLongClickDuration() -> Float

    Return 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

    duration

    The new duration for the long click in seconds.

  • Returns the double click max duration in seconds.

    Declaration

    Objective-C

    - (float)getDoubleClickMaxDuration;

    Swift

    func getDoubleClickMaxDuration() -> Float

    Return 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

    duration

    The 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() -> Int32

    Return Value

    The tile size in density-independent pixels (dp).

  • Sets the tile size for drawing map tiles, to compensate for datasources with bigger or smaller tiles. The default is 256. Style sizes do not follow it: labels stay the same dp whatever tile the layer picks. Set it before adding a layer; a layer reads it when it joins the map.

    Declaration

    Objective-C

    - (void)setTileDrawSize:(int)tileDrawSize;

    Swift

    func setTileDrawSize(_ tileDrawSize: Int32)

    Parameters

    tileDrawSize

    The 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() -> Float

    Return Value

    The zoom offset in levels. The default is 0.

  • Sets how many zoom levels the camera is offset from the SDK’s 256-pixel tile convention; 1 adopts the 512-pixel one of maplibre and mapbox-gl. It only renumbers (label and line sizes do not move), so getZoom(), a stored camera and a visibleZoomRange shift with it.

    Declaration

    Objective-C

    - (void)setZoomOffset:(float)offset;

    Swift

    func setZoomOffset(_ offset: Float)

    Parameters

    offset

    The 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() -> Float

    Return 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 (refine while the tile covers at least a 2x2 block of nominal tiles; on a plane, seen from its nearest point): 1 is that rule, larger is coarser, smaller finer. On a tilted view this, not the draw distance, decides the horizon’s detail.

    Declaration

    Objective-C

    - (void)setTileLODFactor:(float)factor;

    Swift

    func setTileLODFactor(_ factor: Float)

    Parameters

    factor

    The 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() -> Float

    Return Value

    The zoom levels on screen. The default is 9.314, maplibre’s.

  • Sets how many distinct zoom levels the frame may spread over with the horizon at the top of the screen (maplibre’s maxZoomLevelsOnScreen). Higher coarsens the far field faster and costs fewer tiles, lower keeps it finer. The default matches the screen-area rule. Replaces TileLODForeshorteningLimit. Only a globe uses it: on a plane the level falls with the distance alone, one per doubling.

    Declaration

    Objective-C

    - (void)setTileLODMaxZoomLevelsOnScreen:(float)levels;

    Swift

    func setTileLODMaxZoomLevelsOnScreen(_ levels: Float)

    Parameters

    levels

    The 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() -> Float

    Return 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); past it the level is lowered uniformly. Inert at the default TileLODMaxZoomLevelsOnScreen: it only binds when that asks for a gentler far field. Globe only, as TileLODMaxZoomLevelsOnScreen is.

    Declaration

    Objective-C

    - (void)setTileLODTileCountRatio:(float)ratio;

    Swift

    func setTileLODTileCountRatio(_ ratio: Float)

    Parameters

    ratio

    The ratio. The default is 3.

  • Applies a named set of TileLODFactor, TileLODMaxZoomLevelsOnScreen, TileLODTileCountRatio and TileStyleZoomLift at once. They multiply into the tile count, so set a profile for the platform and override one number only if a specific map needs it.

    Declaration

    Objective-C

    - (void)setTileLODProfile:(enum MSFTileLODProfile)profile;

    Swift

    func setTileLODProfile(_ profile: MSFTileLODProfile)

    Parameters

    profile

    The profile to apply.

  • Returns the profile the four LOD numbers currently match.

    Declaration

    Objective-C

    - (enum MSFTileLODProfile)getTileLODProfile;

    Swift

    func getTileLODProfile() -> MSFTileLODProfile

    Return Value

    The profile, or TILE_LOD_PROFILE_CUSTOM when they match none.

  • Returns how many zoom levels above its own a coarsened tile may be styled at.

    Declaration

    Objective-C

    - (int)getTileStyleZoomLift;

    Swift

    func getTileStyleZoomLift() -> Int32

    Return 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, so a converted style’s view-zoom minzoom survives LOD coarsening; which tiles are drawn is unchanged. Bounded, as a far tile styled at the camera zoom emits all near-field labels. 0 uses the tile’s own zoom.

    Declaration

    Objective-C

    - (void)setTileStyleZoomLift:(int)levels;

    Swift

    func setTileStyleZoomLift(_ levels: Int32)

    Parameters

    levels

    The lift in zoom levels. The default is 2.

  • Returns the dots per inch value.

    Declaration

    Objective-C

    - (float)getDPI;

    Swift

    func getDPI() -> Float

    Return 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

    dpi

    The new dots per inch value.

  • Returns the draw distance value.

    Declaration

    Objective-C

    - (float)getDrawDistance;

    Swift

    func getDrawDistance() -> Float

    Return Value

    The draw distance value.

  • Sets a new draw distance value: higher shows more tiles on a tilted map, at a performance and network cost. It moves the horizon, so a sky bitmap may no longer match up. The default is 16.

    Declaration

    Objective-C

    - (void)setDrawDistance:(float)drawDistance;

    Swift

    func setDrawDistance(_ drawDistance: Float)

    Parameters

    drawDistance

    The new draw distance value.

  • Returns how far labels are placed, in multiples of the camera-to-focus distance.

    Declaration

    Objective-C

    - (float)getLabelViewDistance;

    Swift

    func getLabelViewDistance() -> Float

    Return Value

    The label view distance. The default is 5, and 0 means no limit.

  • Sets how far from the camera a label may be placed, in multiples of the camera-to-focus distance. The default 5 is maplibre’s cut. Raise it, or set 0, for a view along the ground (panorama, first person), where the far features are the subject. Placement cost grows with it.

    Declaration

    Objective-C

    - (void)setLabelViewDistance:(float)viewDistance;

    Swift

    func setLabelViewDistance(_ viewDistance: Float)

    Parameters

    viewDistance

    The new label view distance, or 0 for no limit.

  • Returns whether animated 3D models (a CartoCSS model-spin) move.

    Declaration

    Objective-C

    - (BOOL)isModelAnimationsEnabled;

    Swift

    func isModelAnimationsEnabled() -> Bool

    Return Value

    True when they do. The default is true.

  • Sets whether animated 3D models move. While one is on screen the map redraws every frame; turn this off on an e-ink display or to save battery, and they stand still.

    Declaration

    Objective-C

    - (void)setModelAnimationsEnabled:(BOOL)enabled;

    Swift

    func setModelAnimationsEnabled(_ enabled: Bool)

    Parameters

    enabled

    True to animate them.

  • Returns whether 3D models cast shadows.

    Declaration

    Objective-C

    - (BOOL)isModelShadowsEnabled;

    Swift

    func isModelShadowsEnabled() -> Bool

    Return Value

    True when they do. The default is true.

  • Sets whether 3D models (a CartoCSS model rule) cast shadows. Off, they still receive the buildings’ and the terrain’s shadows, and the shadow pass skips them: on a slow GPU, tree shadows can cost more than the trees themselves. A rule’s model-cast-shadows still applies.

    Declaration

    Objective-C

    - (void)setModelShadowsEnabled:(BOOL)enabled;

    Swift

    func setModelShadowsEnabled(_ enabled: Bool)

    Parameters

    enabled

    True to let models cast shadows.

  • Returns how far outside the viewport labels are placed, in screen pixels.

    Declaration

    Objective-C

    - (float)getLabelPadding;

    Swift

    func getLabelPadding() -> Float

    Return Value

    The label padding, or a negative value while it follows the tilt.

  • Sets how far outside the viewport a label may be placed, in screen pixels; more padding, fewer labels blinking as the view turns, at a placement and tile-loading cost. The default is negative: 100 pixels scaled by sin(tilt), floor 20. A panorama wants about half a screen width.

    Declaration

    Objective-C

    - (void)setLabelPadding:(float)padding;

    Swift

    func setLabelPadding(_ padding: Float)

    Parameters

    padding

    The new label padding in screen pixels, or a negative value to follow the tilt.

  • Returns the vertical field of view angle.

    Declaration

    Objective-C

    - (float)getFieldOfViewY;

    Swift

    func getFieldOfViewY() -> Float

    Return Value

    The vertical field of view angle in degrees.

  • Sets the vertical field of view angle. Larger values increase the viewable area, at the cost of performance and additional perspective distortion. The default is 36.87, maplibre’s and mapbox-gl’s: at 70 (before 6.1) the camera stood 2.1 times closer at the same ground scale, so a tilted city or slope at z16 was a wide-angle close-up. Fractional, so an AR overlay can match the field of view of the camera behind it exactly.

    Declaration

    Objective-C

    - (void)setFieldOfViewY:(float)fovY;

    Swift

    func setFieldOfViewY(_ fovY: Float)

    Parameters

    fovY

    The new vertical field of view angle in degrees.

  • Returns the panning mode.

    Declaration

    Objective-C

    - (enum MSFPanningMode)getPanningMode;

    Swift

    func getPanningMode() -> MSFPanningMode

    Return 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

    panningMode

    The new panning mode.

  • Returns the pivot mode.

    Declaration

    Objective-C

    - (enum MSFPivotMode)getPivotMode;

    Swift

    func getPivotMode() -> MSFPivotMode

    Return 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

    pivotMode

    The new pivot mode.

  • Returns true if a tilt gesture orbits the ground under the pointer instead of the screen centre.

    Declaration

    Objective-C

    - (BOOL)isOrbitAroundPivot;

    Swift

    func isOrbitAroundPivot() -> Bool

    Return Value

    True if tilt gestures orbit the pivot point.

  • Sets whether a tilt gesture turns the view about the terrain point under the pointer (the touch midpoint, or the mouse at the start of a right-drag on the web) rather than the screen centre. That point stays still on screen while the view tilts, and on the web while it rotates too. Needs PIVOT_MODE_TOUCHPOINT. The default is false.

    Declaration

    Objective-C

    - (void)setOrbitAroundPivot:(BOOL)enabled;

    Swift

    func setOrbitAroundPivot(_ enabled: Bool)

    Parameters

    enabled

    True to orbit the pivot point.

  • Returns the state of seamless horizontal panning flag.

    Declaration

    Objective-C

    - (BOOL)isSeamlessPanning;

    Swift

    func isSeamlessPanning() -> Bool

    Return 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

    enabled

    The new state of seamless horizontal panning flag.

  • Returns the state of the restricted panning flag.

    Declaration

    Objective-C

    - (BOOL)isRestrictedPanning;

    Swift

    func isRestrictedPanning() -> Bool

    Return 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() -> Bool

    Return 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

    reversed

    True 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() -> Bool

    Return 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

    enabled

    True if zoom gestured should be enabled, false otherwise.

  • Returns the state of rotation gestures.

    Declaration

    Objective-C

    - (BOOL)isRotationGestures;

    Swift

    func isRotationGestures() -> Bool

    Return Value

    True if rotation gestures are enabled. False otherwise.

  • Sets the rotation gestures flag. Rotation gestures allow to use pinch to rotate the map. Enabled by default.

    Declaration

    Objective-C

    - (void)setRotationGestures:(BOOL)enabled;

    Swift

    func setRotationGestures(_ enabled: Bool)

    Parameters

    enabled

    True 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() -> Int32

    Return 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 2, and half the cores (2 to 8) on a Mac or Mac Catalyst build.

    Declaration

    Objective-C

    - (void)setEnvelopeThreadPoolSize:(int)poolSize;

    Swift

    func setEnvelopeThreadPoolSize(_ poolSize: Int32)

    Parameters

    poolSize

    The 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() -> Int32

    Return 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

    poolSize

    The new tile task thread pool size.

  • Returns the clear color used by the renderer before drawing anything else. By default, this is white. It should be set to (0, 0, 0, 0) if transparent MapView is needed.

    Declaration

    Objective-C

    - (MSFColor *)getClearColor;

    Swift

    func getClearColor() -> MSFColor!

    Return Value

    The clear color.

  • Sets the clear color of the renderer.

    Declaration

    Objective-C

    - (void)setClearColor:(MSFColor *)color;

    Swift

    func setClear(_ color: MSFColor!)

    Parameters

    color

    The new clear color.

  • Returns the sky color.

    Declaration

    Objective-C

    - (MSFColor *)getSkyColor;

    Swift

    func getSkyColor() -> MSFColor!

    Return Value

    The sky color.

  • 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

    color

    The new sky color. If the color is transparent, sky is not rendered.

  • Returns the background bitmap. May be null.

    Declaration

    Objective-C

    - (MSFBitmap *)getBackgroundBitmap;

    Swift

    func getBackgroundBitmap() -> MSFBitmap!

    Return Value

    The background bitmap.

  • Sets the background bitmap, scaled and repeated to fill the space with no map data; null disables it. Width and height must be powers of two (e.g. 256 * 256 or 128 * 512), square preferred. The default is “default_background.png”.

    Declaration

    Objective-C

    - (void)setBackgroundBitmap:(MSFBitmap *)backgroundBitmap;

    Swift

    func setBackgroundBitmap(_ backgroundBitmap: MSFBitmap!)

    Parameters

    backgroundBitmap

    The new background bitmap.

  • Returns the state of the user input flag.

    Declaration

    Objective-C

    - (BOOL)isUserInput;

    Swift

    func isUserInput() -> Bool

    Return 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 true.

    Declaration

    Objective-C

    - (void)setUserInput:(BOOL)enabled;

    Swift

    func setUserInput(_ enabled: Bool)

    Parameters

    enabled

    The new state of the user input flag.

  • Returns the panning speed mode.

    Declaration

    Objective-C

    - (enum MSFPanningSpeedMode)getPanningSpeedMode;

    Swift

    func getPanningSpeedMode() -> MSFPanningSpeedMode

    Return 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.

    Declaration

    Objective-C

    - (void)setPanningSpeedMode:(enum MSFPanningSpeedMode)mode;

    Swift

    func setPanningSpeedMode(_ mode: MSFPanningSpeedMode)

    Parameters

    mode

    The new panning speed mode.

  • Returns the free roam mode.

    Declaration

    Objective-C

    - (enum MSFFreeRoamMode)getFreeRoamMode;

    Swift

    func getFreeRoamMode() -> MSFFreeRoamMode

    Return Value

    The free roam mode.

  • Sets the free roam mode: what a one-finger drag does, and which camera model tilt and rotation follow. It makes sky content (CelestialLayer) reachable; looking above the horizon also needs a negative tilt range, e.g. setTiltRange(MapRange(-90, 90)). The default is FREE_ROAM_MODE_OFF.

    Declaration

    Objective-C

    - (void)setFreeRoamMode:(enum MSFFreeRoamMode)mode;

    Swift

    func setFreeRoamMode(_ mode: MSFFreeRoamMode)

    Parameters

    mode

    The new free roam mode.

  • Returns how fast a FREE_ROAM_MODE_LOOK drag turns the view.

    Declaration

    Objective-C

    - (float)getFreeRoamLookSensitivity;

    Swift

    func getFreeRoamLookSensitivity() -> Float

    Return Value

    The turn in degrees per inch of drag.

  • Sets how fast a FREE_ROAM_MODE_LOOK drag turns the view, in degrees per inch. The default is 360. FREE_ROAM_MODE_FIRST_PERSON ignores it: its look keeps the ground under the finger.

    Declaration

    Objective-C

    - (void)setFreeRoamLookSensitivity:(float)degrees;

    Swift

    func setFreeRoamLookSensitivity(_ degrees: Float)

    Parameters

    degrees

    The turn in degrees per inch.

  • Returns the first person move multiplier.

    Declaration

    Objective-C

    - (float)getFreeRoamMoveSpeed;

    Swift

    func getFreeRoamMoveSpeed() -> Float

    Return Value

    A multiplier on the ground the drag actually covers. 1 tracks the cursor.

  • Scales the two-finger move in FREE_ROAM_MODE_FIRST_PERSON over the ground the drag covers. The default 1 keeps the ground under the cursor; below 1 it lags, above 1 it runs ahead.

    Declaration

    Objective-C

    - (void)setFreeRoamMoveSpeed:(float)multiplier;

    Swift

    func setFreeRoamMoveSpeed(_ multiplier: Float)

    Parameters

    multiplier

    The multiplier on the tracked distance.

  • Returns the state of the kinetic panning flag.

    Declaration

    Objective-C

    - (BOOL)isKineticPan;

    Swift

    func isKineticPan() -> Bool

    Return 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

    enabled

    The new state of the kinetic panning flag.

  • Returns the state of the kinetic rotation flag.

    Declaration

    Objective-C

    - (BOOL)isKineticRotation;

    Swift

    func isKineticRotation() -> Bool

    Return 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

    enabled

    The new state of the kinetic rotation flag.

  • Returns the state of kinetic zoom flag.

    Declaration

    Objective-C

    - (BOOL)isKineticZoom;

    Swift

    func isKineticZoom() -> Bool

    Return 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

    enabled

    The new state of the kinetic zooming flag.

  • Returns the state of the map rotatability flag.

    Declaration

    Objective-C

    - (BOOL)isRotatable;

    Swift

    func isRotatable() -> Bool

    Return 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

    enabled

    The new state of the map rotatability flag.

  • Returns the tilt range constraint.

    Declaration

    Objective-C

    - (MSFMapRange *)getTiltRange;

    Swift

    func getTiltRange() -> MSFMapRange!

    Return Value

    The tilt range constraint in degrees.

  • Sets the tilt range constraint; the current tilt is unaffected until it next changes. Values are clamped to [-90, 90]. A negative tilt pitches the view above the horizon, which is opt-in. The default value is MapRange(3, 90).

    Declaration

    Objective-C

    - (void)setTiltRange:(MSFMapRange *)tiltRange;

    Swift

    func setTiltRange(_ tiltRange: MSFMapRange!)

    Parameters

    tiltRange

    The new tilt range constraint in degrees.

  • Returns the zoom range constraint.

    Declaration

    Objective-C

    - (MSFMapRange *)getZoomRange;

    Swift

    func getZoomRange() -> MSFMapRange!

    Return Value

    The zoom range constraint.

  • Sets the zoom range constraint; the current zoom is unaffected until it next changes. Values are clamped to [0, 24]. The default value is MapRange(0, 24).

    Declaration

    Objective-C

    - (void)setZoomRange:(MSFMapRange *)zoomRange;

    Swift

    func setZoom(_ zoomRange: MSFMapRange!)

    Parameters

    zoomRange

    The new zoom range constraint.

  • Returns the map panning bounds constraints. Map bounds minimum and maximum points are in the base projection’s coordinate system.

    Declaration

    Objective-C

    - (MSFMapBounds *)getPanBounds;

    Swift

    func getPanBounds() -> MSFMapBounds!

    Return Value

    The map bounds constraints.

  • Sets the map panning bounds constraints, in the base projection’s coordinate system; the current position is unaffected until the camera next moves. Bounds larger than the world are clamped to world bounds. The default value covers the whole world.

    Declaration

    Objective-C

    - (void)setPanBounds:(MSFMapBounds *)panBounds;

    Swift

    func setPanBounds(_ panBounds: MSFMapBounds!)

    Parameters

    panBounds

    The 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

    offset

    The 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 (getters and setters) use the coordinate system of this projection. The default is EPSG3857.

    Declaration

    Objective-C

    - (void)setBaseProjection:(MSFProjection *)baseProjection;

    Swift

    func setBaseProjection(_ baseProjection: MSFProjection!)

    Parameters

    baseProjection

    The 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: 3D terrain is rendered from their elevation data source; null disables it. Terrain is currently only supported with the PLANAR render projection mode. 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

    terrainOptions

    The 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

    skyOptions

    The 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

    fogOptions

    The 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

    lightOptions

    The 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

    enabled

    wether 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() -> Bool

    Return Value

    True if layers are processed in reversed order.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()