NTOptions


@interface NTOptions : NSObject {
  void *swigCPtr;
  BOOL swigCMemOwn;
}

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;

    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;

    Return Value

    The hash value of this object.

  • Returns the color of the ambient light.

    Declaration

    Objective-C

    - (NTColor *)getAmbientLightColor;

    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:(NTColor *)color;

    Parameters

    color

    The new color for the ambient light.

  • Returns the color of the main light.

    Declaration

    Objective-C

    - (NTColor *)getMainLightColor;

    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:(NTColor *)color;

    Parameters

    color

    The new color for the main light.

  • Returns the direction of the main light.

    Declaration

    Objective-C

    - (NTMapVec *)getMainLightDirection;

    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:(NTMapVec *)direction;

    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 NTRenderProjectionMode)getRenderProjectionMode;

    Return Value

    The render projection mode.

  • Sets the render projection mode. The default is RenderProjectionMode::PLANAR.

    Declaration

    Objective-C

    - (void)setRenderProjectionMode:
        (enum NTRenderProjectionMode)renderProjectionMode;

    Parameters

    renderProjectionMode

    The new render projection mode.

  • Returns the click type detection state.

    Declaration

    Objective-C

    - (BOOL)isClickTypeDetection;

    Return Value

    True if click type detecton 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 click type resolving take about 400ms, so for applications that do not require this functionality, it can be turned off. The default is true.

    Declaration

    Objective-C

    - (void)setClickTypeDetection:(BOOL)enabled;

    Parameters

    enabled

    The new state of the click type detection flag.

  • Returns the tile size used for drawing map tiles.

    Declaration

    Objective-C

    - (int)getTileDrawSize;

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

    Declaration

    Objective-C

    - (void)setTileDrawSize:(int)tileDrawSize;

    Parameters

    tileDrawSize

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

  • Returns the dots per inch value.

    Declaration

    Objective-C

    - (float)getDPI;

    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;

    Parameters

    dpi

    The new dots per inch value.

  • Returns the draw distance value.

    Declaration

    Objective-C

    - (float)getDrawDistance;

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

    Parameters

    drawDistance

    The new draw distance value.

  • Returns the vertial field of view angle.

    Declaration

    Objective-C

    - (int)getFieldOfViewY;

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

    Parameters

    fovY

    The new vertical field of view angle in degrees.

  • Returns the panning mode.

    Declaration

    Objective-C

    - (enum NTPanningMode)getPanningMode;

    Return Value

    The panning mode.

  • Sets the panning mode. The default is PanningMode::FREE.

    Declaration

    Objective-C

    - (void)setPanningMode:(enum NTPanningMode)panningMode;

    Parameters

    panningMode

    The new panning mode.

  • Returns the pivot mode.

    Declaration

    Objective-C

    - (enum NTPivotMode)getPivotMode;

    Return Value

    The pivot mode.

  • Sets the pivot mode. The default is PIVOT_MODE_TOUCHPOINT

    Declaration

    Objective-C

    - (void)setPivotMode:(enum NTPivotMode)pivotMode;

    Parameters

    pivotMode

    The new pivot mode.

  • Returns the state of seamless horizontal panning flag.

    Declaration

    Objective-C

    - (BOOL)isSeamlessPanning;

    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;

    Parameters

    enabled

    The new state of seamless horizontal panning flag.

  • Returns the state of the restricted panning flag.

    Declaration

    Objective-C

    - (BOOL)isRestrictedPanning;

    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;
  • Returns true if tilting gesture direction is reversed (and same as with Google Maps).

    Declaration

    Objective-C

    - (BOOL)isTiltGestureReversed;

    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;

    Parameters

    reversed

    True if Google Maps compatible mode should be used. False otherwise (default).

  • Returns the state of zoom gestures. Zoom gestures allow to use double click and dual click to zoom in/out of the map.

    Declaration

    Objective-C

    - (BOOL)isZoomGestures;

    Return Value

    True if zoom gestures are enabled. False otherwise.

  • Sets the zoom gestures flag. By default, zoom gestures are not enabled.

    Declaration

    Objective-C

    - (void)setZoomGestures:(BOOL)enabled;

    Parameters

    enabled

    True if zoom gestured should be enabled, false otherwise.

  • Returns the number of threads used by the envelope task pool.

    Declaration

    Objective-C

    - (int)getEnvelopeThreadPoolSize;

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

    Declaration

    Objective-C

    - (void)setEnvelopeThreadPoolSize:(int)poolSize;

    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;

    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;

    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

    - (NTColor *)getClearColor;

    Return Value

    The clear color.

  • Sets the clear color of the renderer.

    Declaration

    Objective-C

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

    Parameters

    color

    The new clear color.

  • Returns the sky color.

    Declaration

    Objective-C

    - (NTColor *)getSkyColor;

    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:(NTColor *)color;

    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

    - (NTBitmap *)getBackgroundBitmap;

    Return Value

    The background bitmap.

  • 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:(NTBitmap *)backgroundBitmap;

    Parameters

    backgroundBitmap

    The new background bitmap.

  • Returns the horizontal alignment of the watermark.

    Declaration

    Objective-C

    - (float)getWatermarkAlignmentX;

    Return Value

    The horizontal alignment of the watermark.

  • Sets the position of the watermark relative to the screen. Values will be clamped to [-1, 1] range.

    Declaration

    Objective-C

    - (void)setWatermarkAlignmentX:(float)alignmentX;

    Parameters

    alignmentX

    The new horizontal alignment for the watermark. -1 means the left side, 0 the center and 1 the right side. The default is 1.

  • Returns the vertical alignment of the watermark.

    Declaration

    Objective-C

    - (float)getWatermarkAlignmentY;

    Return Value

    The vertical alignment of the watermark.

  • Sets the position of the watermark relative to the screen. Values will be clamped to [-1, 1] range.

    Declaration

    Objective-C

    - (void)setWatermarkAlignmentY:(float)alignmentY;

    Parameters

    alignmentY

    The new vertical alignment for the watermark. -1 means the bottom, 0 the center and 1 the top. The default is -1.

  • Returns the watermark relative scale.

    Declaration

    Objective-C

    - (float)getWatermarkScale;

    Return Value

    The watermark relative scale. The default is 1.

  • Set the watermark relative scale. By default, watermark size is independant of the actual watermark bitmap size. This method can be used to change this.

    Declaration

    Objective-C

    - (void)setWatermarkScale:(float)scale;

    Parameters

    scale

    The new relative scale value.

  • Returns the watermark bitmap. May be null.

    Declaration

    Objective-C

    - (NTBitmap *)getWatermarkBitmap;

    Return Value

    The watermark bitmap.

  • Sets the watermark bitmap. This is only available with enterprise licenses. The watermark will be displayed on top of the map view in a user chosen corner. If null is passed no watermark will be displayed.

    Declaration

    Objective-C

    - (void)setWatermarkBitmap:(NTBitmap *)watermarkBitmap;

    Parameters

    watermarkBitmap

    The new watermark bitmap.

  • Returns the padding of the watermark.

    Declaration

    Objective-C

    - (NTScreenPos *)getWatermarkPadding;

    Return Value

    The padding of the watermark in dp.

  • Sets the padding between the watermark and the edge of the screen.

    Declaration

    Objective-C

    - (void)setWatermarkPadding:(NTScreenPos *)padding;

    Parameters

    padding

    The new padding for the watermark in dp. The default is 4,4.

  • Returns the state of the user input flag.

    Declaration

    Objective-C

    - (BOOL)isUserInput;

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

    Declaration

    Objective-C

    - (void)setUserInput:(BOOL)enabled;

    Parameters

    enabled

    The new state of the user input flag.

  • Returns the state of the kinetic panning flag.

    Declaration

    Objective-C

    - (BOOL)isKineticPan;

    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;

    Parameters

    enabled

    The new state of the kinetic panning flag.

  • Returns the state of the kinetic rotation flag.

    Declaration

    Objective-C

    - (BOOL)isKineticRotation;

    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;

    Parameters

    enabled

    The new state of the kinetic rotation flag.

  • Returns the state of kinetic zoom flag.

    Declaration

    Objective-C

    - (BOOL)isKineticZoom;

    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;

    Parameters

    enabled

    The new state of the kinetic zooming flag.

  • Returns the state of the map rotatability flag.

    Declaration

    Objective-C

    - (BOOL)isRotatable;

    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;

    Parameters

    enabled

    The new state of the map rotatability flag.

  • Returns the tilt range constraint.

    Declaration

    Objective-C

    - (NTMapRange *)getTiltRange;

    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 30 degrees and the maximum is 90 degrees. Values that are out of range will be clamped. The default value is MapRange(30, 90).

    Declaration

    Objective-C

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

    Parameters

    tiltRange

    The new tilt range constraint in degrees.

  • Returns the zoom range constraint.

    Declaration

    Objective-C

    - (NTMapRange *)getZoomRange;

    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:(NTMapRange *)zoomRange;

    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

    - (NTMapBounds *)getPanBounds;

    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:(NTMapBounds *)panBounds;

    Parameters

    panBounds

    The new map bounds constraints.

  • Returns the focus point offset (from screen center) in pixels.

    Declaration

    Objective-C

    - (NTScreenPos *)getFocusPointOffset;

    Return Value

    The focus point offset in pixels.

  • Sets the focus point offset (from screen center) in pixels.

    Declaration

    Objective-C

    - (void)setFocusPointOffset:(NTScreenPos *)offset;

    Parameters

    offset

    The new focus point offset in pixels.

  • Returns the base projection.

    Declaration

    Objective-C

    - (NTProjection *)getBaseProjection;

    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:(NTProjection *)baseProjection;

    Parameters

    baseProjection

    The new base projection.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;