Other Constants
The following constants are available globally.
-
An
NSNumber
object containing a Boolean value; specifies whether the shape of anDingiComputedShapeSource
should be wrapped to accomodate coordinates with longitudes beyond −180 and 180. The default value isNO
.Setting this option to
YES
affects rendering performance.This option is used with the
DingiComputedShapeSource
class; it is ignored when creating anDingiShapeSource
object.Declaration
Objective-C
extern const DingiShapeSourceOption _Nonnull DingiShapeSourceOptionWrapsCoordinates
Swift
static let wrapsCoordinates: DingiShapeSourceOption
-
An
NSNumber
object containing a Boolean value; specifies whether the shape of anDingiComputedShapeSource
should be clipped at the edge of each tile. The default value isNO
.Setting this option to
YES
affects rendering performance. Use this option to clipDingiPolyline
s andDingiPolygon
s at tile boundaries without artifacts.This option is used with the
DingiComputedShapeSource
class; it is ignored when creating anDingiShapeSource
object.Declaration
Objective-C
extern const DingiShapeSourceOption _Nonnull DingiShapeSourceOptionClipsCoordinates
Swift
static let clipsCoordinates: DingiShapeSourceOption
-
Posted by the shared
DingiOfflineStorage
object when anDingiOfflinePack
object’s progress changes. The progress may change due to a resource being downloaded or because the pack discovers during the download that more resources are required for offline viewing. This notification is posted whenever any field in theprogress
property changes.The
object
is theDingiOfflinePack
object whose progress changed. TheuserInfo
dictionary contains the pack’s current state in theDingiOfflinePackStateUserInfoKey
key and details about the pack’s current progress in theDingiOfflinePackProgressUserInfoKey
key. You may also consult theDingiOfflinePack.state
andDingiOfflinePack.progress
properties, which provide the same values.If you only need to observe changes in a particular pack’s progress, you can alternatively observe KVO change notifications to the pack’s
progress
key path.Declaration
Objective-C
extern const NSNotificationName _Nonnull DingiOfflinePackProgressChangedNotification
Swift
static let DingiOfflinePackProgressChanged: NSNotification.Name
-
Posted by the shared
DingiOfflineStorage
object whenever anDingiOfflinePack
object encounters an error while downloading. The error may be recoverable and may not warrant the user’s attention. For example, the pack’s implementation may attempt to re-request failed resources based on an exponential backoff strategy or upon the restoration of network access.The
object
is theDingiOfflinePack
object that encountered the error. TheuserInfo
dictionary contains the error object in theDingiOfflinePackErrorUserInfoKey
key.Declaration
Objective-C
extern const NSNotificationName _Nonnull DingiOfflinePackErrorNotification
Swift
static let DingiOfflinePackError: NSNotification.Name
-
Posted by the shared
DingiOfflineStorage
object when the maximum number of tiles has been downloaded and stored on the current device.The
object
is theDingiOfflinePack
object that reached the tile limit in the course of downloading. TheuserInfo
dictionary contains the tile limit in theDingiOfflinePackMaximumCountUserInfoKey
key.Once this limit is reached, no instance of
DingiOfflinePack
can download additional tiles from Dingi APIs until already downloaded tiles are removed by calling the-[DingiOfflineStorage removePack:withCompletionHandler:]
method. Contact your Dingi sales representative to have the limit raised.Declaration
Objective-C
extern const NSNotificationName _Nonnull DingiOfflinePackMaximumDingiTilesReachedNotification
Swift
static let DingiOfflinePackMaximumDingiTilesReached: NSNotification.Name
-
The key for an
NSNumber
object that indicates an offline pack’s current state. This key is used in theuserInfo
dictionary of anDingiOfflinePackProgressChangedNotification
notification. Call-integerValue
on the object to receive theDingiOfflinePackState
-typed state.Declaration
Objective-C
extern const DingiOfflinePackUserInfoKey _Nonnull DingiOfflinePackUserInfoKeyState
Swift
static let state: DingiOfflinePackUserInfoKey
-
The key for an
NSValue
object that indicates an offline pack’s current progress. This key is used in theuserInfo
dictionary of anDingiOfflinePackProgressChangedNotification
notification. Call-DingiOfflinePackProgressValue
on the object to receive theDingiOfflinePackProgress
-typed progress.Declaration
Objective-C
extern const DingiOfflinePackUserInfoKey _Nonnull DingiOfflinePackUserInfoKeyProgress
Swift
static let progress: DingiOfflinePackUserInfoKey
-
The key for an
NSError
object that is encountered in the course of downloading an offline pack. This key is used in theuserInfo
dictionary of anDingiOfflinePackErrorNotification
notification. The error’s domain isDingiErrorDomain
. SeeDingiErrorCode
for possible error codes.Declaration
Objective-C
extern const DingiOfflinePackUserInfoKey _Nonnull DingiOfflinePackUserInfoKeyError
Swift
static let error: DingiOfflinePackUserInfoKey
-
The key for an
NSNumber
object that indicates the maximum number of Dingi-hosted tiles that may be downloaded and stored on the current device. This key is used in theuserInfo
dictionary of anDingiOfflinePackMaximumDingiTilesReachedNotification
notification. Call-unsignedLongLongValue
on the object to receive theuint64_t
-typed tile limit.Declaration
Objective-C
extern const DingiOfflinePackUserInfoKey _Nonnull DingiOfflinePackUserInfoKeyMaximumCount
Swift
static let maximumCount: DingiOfflinePackUserInfoKey
-
An
NSNumber
object containing an unsigned integer that specifies the encoding formula for raster-dem tilesets. The integer corresponds to one of the constants described inDingiDEMEncoding
.The default value for this option is
DingiDEMEncodingMapbox
.This option cannot be represented in a TileJSON or style JSON file. It is used with the
DingiRasterDEMSource
class and is ignored when creating anDingiRasterTileSource
orDingiVectorTileSource
object.Declaration
Objective-C
extern const DingiTileSourceOption DingiTileSourceOptionDEMEncoding
Swift
static let demEncoding: DingiTileSourceOption
-
An
NSNumber
object containing a floating-point number that specifies the width and height (measured in points) at which the map displays each raster image tile when the map’s zoom level is an integer. The raster tile source scales its images up or down when the map’s zoom level falls between two integers.The default value for this option is 512. Version 4 of the Mapbox Maps API requires a value of 256, as do many third-party tile servers, so consult your provider’s documentation for the correct value.
This option is only applicable to
DingiRasterTileSource
objects; it is ignored when initializingDingiVectorTileSource
objects.Declaration
Objective-C
extern const DingiTileSourceOption _Nonnull DingiTileSourceOptionTileSize
Swift
static let tileSize: DingiTileSourceOption
-
An
NSNumber
object containing a Boolean enabling or disabling clustering. If theshape
property contains point shapes, setting this option toYES
clusters the points by radius into groups. The default value isNO
.This option only affects point features within an
DingiShapeSource
object; it is ignored when creating anDingiComputedShapeSource
object.Declaration
Objective-C
extern const DingiShapeSourceOption _Nonnull DingiShapeSourceOptionClustered
Swift
static let clustered: DingiShapeSourceOption
-
An
NSNumber
object containing an integer; specifies the radius of each cluster if clustering is enabled. A value of 512 produces a radius equal to the width of a tile. The default value is 50.This option only affects point features within an
DingiShapeSource
object; it is ignored when creating anDingiComputedShapeSource
object.Declaration
Objective-C
extern const DingiShapeSourceOption _Nonnull DingiShapeSourceOptionClusterRadius
Swift
static let clusterRadius: DingiShapeSourceOption
-
An
NSNumber
object containing an integer; specifies the maximum zoom level at which to cluster points if clustering is enabled. Defaults to one zoom level less than the value ofDingiShapeSourceOptionMaximumZoomLevel
so that, at the maximum zoom level, the shapes are not clustered.This option only affects point features within an
DingiShapeSource
object; it is ignored when creating anDingiComputedShapeSource
object.Declaration
Objective-C
extern const DingiShapeSourceOption _Nonnull DingiShapeSourceOptionMaximumZoomLevelForClustering
Swift
static let maximumZoomLevelForClustering: DingiShapeSourceOption
-
An
NSNumber
object containing an integer; specifies the minimum zoom level at which to create vector tiles. The default value is 0.Declaration
Objective-C
extern const DingiShapeSourceOption _Nonnull DingiShapeSourceOptionMinimumZoomLevel
Swift
static let minimumZoomLevel: DingiShapeSourceOption
-
An
NSNumber
object containing an integer; specifies the maximum zoom level at which to create vector tiles. A greater value produces greater detail at high zoom levels. The default value is 18.Declaration
Objective-C
extern const DingiShapeSourceOption _Nonnull DingiShapeSourceOptionMaximumZoomLevel
Swift
static let maximumZoomLevel: DingiShapeSourceOption
-
An
NSNumber
object containing an integer; specifies the size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance. The default value is 128.Declaration
Objective-C
extern const DingiShapeSourceOption _Nonnull DingiShapeSourceOptionBuffer
Swift
static let buffer: DingiShapeSourceOption
-
An
NSNumber
object containing a double; specifies the Douglas-Peucker simplification tolerance. A greater value produces simpler geometries and improves performance. The default value is 0.375.Declaration
Objective-C
extern const DingiShapeSourceOption _Nonnull DingiShapeSourceOptionSimplificationTolerance
Swift
static let simplificationTolerance: DingiShapeSourceOption
-
An
NSNumber
object containing a Boolean enabling or disabling calculating line distance metrics.Set this property to
YES
in order for theDingiLineStyleLayer.lineGradient
property to have its intended effect. The default value isNO
.Declaration
Objective-C
extern const DingiShapeSourceOption _Nonnull DingiShapeSourceOptionLineDistanceMetrics
Swift
static let lineDistanceMetrics: DingiShapeSourceOption
-
A version number identifying the default version of the Mapbox Streets style obtained through the
-streetsStyleURL
method. This version number may also be passed into the-streetsStyleURLWithVersion:
method.The value of this constant generally corresponds to the latest released version as of the date on which this SDK was published. You can use this constant to ascertain the style used by
DingiMapView
andDingiTilePyramidOfflineRegion
when no style URL is specified. Consult the Mapbox Styles API documentation for the most up-to-date style versioning information.Warning
The value of this constant may change in a future release of the SDK. If you use any feature that depends on a specific aspect of a default style – for instance, the minimum zoom level that includes roads – you may use the current value of this constant or the underlying style URL, but do not use the constant itself. Such details may change significantly from version to version.Declaration
Objective-C
static const NSInteger DingiStyleDefaultVersion = 10
Swift
let DingiStyleDefaultVersion: Int
-
An
NSNumber
object containing an unsigned integer that specifies the minimum zoom level at which to display tiles from the source.The value should be between 0 and 22, inclusive, and less than
DingiTileSourceOptionMaximumZoomLevel
, if specified. The default value for this option is 0.This option corresponds to the
minzoom
key in the TileJSON specification.Declaration
Objective-C
extern const DingiTileSourceOption _Nonnull DingiTileSourceOptionMinimumZoomLevel
Swift
static let minimumZoomLevel: DingiTileSourceOption
-
An
NSNumber
object containing an unsigned integer that specifies the maximum zoom level at which to display tiles from the source.The value should be between 0 and 22, inclusive, and less than
DingiTileSourceOptionMinimumZoomLevel
, if specified. The default value for this option is 22.This option corresponds to the
maxzoom
key in the TileJSON specification.Declaration
Objective-C
extern const DingiTileSourceOption _Nonnull DingiTileSourceOptionMaximumZoomLevel
Swift
static let maximumZoomLevel: DingiTileSourceOption
-
An
NSValue
object containing anDingiCoordinateBounds
struct that specifies the geographic extent of the source.If this option is specified, the SDK avoids requesting any tile that falls outside of the coordinate bounds. Otherwise, the SDK requests any tile needed to cover the viewport, as it does by default.
This option corresponds to the
bounds
key in the TileJSON specification.Declaration
Objective-C
extern const DingiTileSourceOption _Nonnull DingiTileSourceOptionCoordinateBounds
Swift
static let coordinateBounds: DingiTileSourceOption
-
An HTML string defining the buttons to be displayed in an action sheet when the source is part of a map view’s style and the map view’s attribution button is pressed.
By default, no attribution statements are displayed. If the
DingiTileSourceOptionAttributionInfos
option is specified, this option is ignored.This option corresponds to the
attribution
key in the TileJSON specification.Declaration
Objective-C
extern const DingiTileSourceOption _Nonnull DingiTileSourceOptionAttributionHTMLString
Swift
static let attributionHTMLString: DingiTileSourceOption
-
An array of
DingiAttributionInfo
objects defining the buttons to be displayed in an action sheet when the source is part of a map view’s style and the map view’s attribution button is pressed.By default, no attribution statements are displayed.
Declaration
Objective-C
extern const DingiTileSourceOption _Nonnull DingiTileSourceOptionAttributionInfos
Swift
static let attributionInfos: DingiTileSourceOption
-
An
NSNumber
object containing an unsigned integer that specifies the tile coordinate system for the source’s tile URLs. The integer corresponds to one of the constants described inDingiTileCoordinateSystem
.The default value for this option is
DingiTileCoordinateSystemXYZ
.This option corresponds to the
scheme
key in the TileJSON specification.Declaration
Objective-C
extern const DingiTileSourceOption _Nonnull DingiTileSourceOptionTileCoordinateSystem
Swift
static let tileCoordinateSystem: DingiTileSourceOption
-
Indicates an error occurred in the Mapbox SDK.
Declaration
Objective-C
extern const NSErrorDomain _Nonnull DingiErrorDomain
Swift
let DingiErrorDomain: String
-
An
NSString
identifying thelinear
interpolation type in anNSExpression
.This attribute corresponds to the
linear
value in theinterpolate
expression operator in the Mapbox Style Specification.Declaration
Objective-C
extern const DingiExpressionInterpolationMode _Nonnull DingiExpressionInterpolationModeLinear
Swift
static let linear: DingiExpressionInterpolationMode
-
An
NSString
identifying theexpotential
interpolation type in anNSExpression
.This attribute corresponds to the
exponential
value in theinterpolate
expression operator in the Mapbox Style Specification.Declaration
Objective-C
extern const DingiExpressionInterpolationMode _Nonnull DingiExpressionInterpolationModeExponential
Swift
static let exponential: DingiExpressionInterpolationMode
-
An
NSString
identifying thecubic-bezier
interpolation type in anNSExpression
.This attribute corresponds to the
cubic-bezier
value in theinterpolate
expression operator in the Mapbox Style Specification.Declaration
Objective-C
extern const DingiExpressionInterpolationMode _Nonnull DingiExpressionInterpolationModeCubicBezier
Swift
static let cubicBezier: DingiExpressionInterpolationMode
-
Project version number for Mapbox.
Declaration
Objective-C
extern double DingiMapVersionNumber
Swift
var DingiMapVersionNumber: Double
-
Project version string for Mapbox.
Declaration
Objective-C
extern const unsigned char DingiMapVersionString[]
-
The default deceleration rate for a map view.
Declaration
Objective-C
extern const DingiMapViewDecelerationRate DingiMapViewDecelerationRateNormal
Swift
static let normal: DingiMapViewDecelerationRate
-
A fast deceleration rate for a map view.
Declaration
Objective-C
extern const DingiMapViewDecelerationRate DingiMapViewDecelerationRateFast
Swift
static let fast: DingiMapViewDecelerationRate
-
Disables deceleration in a map view.
Declaration
Objective-C
extern const DingiMapViewDecelerationRate DingiMapViewDecelerationRateImmediate
Swift
static let immediate: DingiMapViewDecelerationRate
-
The default frame rate. This can be either 30 FPS or 60 FPS, depending on device capabilities.
Declaration
Objective-C
extern const DingiMapViewPreferredFramesPerSecond DingiMapViewPreferredFramesPerSecondDefault
Swift
static let `default`: DingiMapViewPreferredFramesPerSecond
-
A conservative frame rate; typically 30 FPS.
Declaration
Objective-C
extern const DingiMapViewPreferredFramesPerSecond DingiMapViewPreferredFramesPerSecondLowPower
Swift
static let lowPower: DingiMapViewPreferredFramesPerSecond
-
The maximum supported frame rate; typically 60 FPS.
Declaration
Objective-C
extern const DingiMapViewPreferredFramesPerSecond DingiMapViewPreferredFramesPerSecondMaximum
Swift
static let maximum: DingiMapViewPreferredFramesPerSecond