+ +
+
+

Other Constants

+

The following constants are available globally.

+ +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
    +
  • + +
    +
    +
    +

    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 MGLRasterTileSource objects; it is ignored +when initializing MGLVectorTileSource objects.

    + +
    +
    +

    Declaration

    +
    +

    Objective-C

    +
    extern const MGLTileSourceOption _Nonnull MGLTileSourceOptionTileSize
    + +
    +
    +

    Swift

    +
    static let tileSize: MGLTileSourceOption
    + +
    +
    + +
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
    +
    +

    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 MGLMapView and MGLTilePyramidOfflineRegion 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 MGLStyleDefaultVersion = 10
    + +
    +
    +

    Swift

    +
    let MGLStyleDefaultVersion: Int
    + +
    +
    + +
    +
    +
  • +
+
+
+ +
+
+
    +
  • +
    + + + + MGLErrorDomain + +
    +
    +
    +
    +

    Indicates an error occurred in the Mapbox SDK.

    + +
    +
    +

    Declaration

    +
    +

    Objective-C

    +
    extern const NSErrorDomain _Nonnull MGLErrorDomain
    + +
    +
    +

    Swift

    +
    let MGLErrorDomain: String
    + +
    +
    + +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +

    An NSString identifying the linear interpolation type in an NSExpression.

    + +

    This attribute corresponds to the linear value in the +interpolate +expression operator in the Mapbox Style Specification.

    + +
    +
    +

    Declaration

    +
    +

    Objective-C

    +
    extern const MGLExpressionInterpolationMode _Nonnull MGLExpressionInterpolationModeLinear
    + +
    +
    +

    Swift

    +
    static let linear: MGLExpressionInterpolationMode
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +

    An NSString identifying the expotential interpolation type in an NSExpression.

    + +

    This attribute corresponds to the exponential value in the +interpolate +expression operator in the Mapbox Style Specification.

    + +
    +
    +

    Declaration

    +
    +

    Objective-C

    +
    extern const MGLExpressionInterpolationMode _Nonnull MGLExpressionInterpolationModeExponential
    + +
    +
    +

    Swift

    +
    static let exponential: MGLExpressionInterpolationMode
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +

    An NSString identifying the cubic-bezier interpolation type in an NSExpression.

    + +

    This attribute corresponds to the cubic-bezier value in the +interpolate +expression operator in the Mapbox Style Specification.

    + +
    +
    +

    Declaration

    +
    +

    Objective-C

    +
    extern const MGLExpressionInterpolationMode _Nonnull MGLExpressionInterpolationModeCubicBezier
    + +
    +
    +

    Swift

    +
    static let cubicBezier: MGLExpressionInterpolationMode
    + +
    +
    + +
    +
    +
  • +
+
+
+ +
+
+
+ +