MGLSymbolStyleLayer
@interface MGLSymbolStyleLayer : MGLVectorStyleLayer
                An MGLSymbolStyleLayer is a style layer that renders icon and text labels at
points or along lines on the map.
Use a symbol style layer to configure the visual appearance of labels for
features in vector tiles loaded by an MGLVectorSource object or MGLShape or
MGLFeature instances in an MGLShapeSource object.
You can access an existing symbol style layer using the
-[MGLStyle layerWithIdentifier:] method if you know its identifier;
otherwise, find it using the MGLStyle.layers property. You can also create a
new symbol style layer and add it to the style using a method such as
-[MGLStyle addLayer:].
Example
let layer = MGLSymbolStyleLayer(identifier: "coffeeshops", source: pois)
layer.sourceLayerIdentifier = "pois"
layer.iconImageName = MGLStyleValue(rawValue: "coffee")
layer.iconScale = MGLStyleValue(rawValue: 0.5)
layer.text = MGLStyleValue(rawValue: "{name}")
layer.textTranslation = MGLStyleValue(rawValue: NSValue(cgVector: CGVector(dx: 10, dy: 0)))
layer.textJustification = MGLStyleValue(rawValue: NSValue(mglTextJustification: .left))
layer.textAnchor = MGLStyleValue(rawValue: NSValue(mglTextAnchor: .left))
layer.predicate = NSPredicate(format: "%K == %@", "venue-type", "coffee")
mapView.style?.addLayer(layer)
          - 
                  
                  
Returns a symbol style layer initialized with an identifier and source.
After initializing and configuring the style layer, add it to a map view’s style using the
-[MGLStyle addLayer:]or-[MGLStyle insertLayer:belowLayer:]method.Declaration
Objective-C
- (nonnull instancetype)initWithIdentifier:(nonnull NSString *)identifier source:(nonnull MGLSource *)source;Swift
init(identifier: String, source: MGLSource)Parameters
identifierA string that uniquely identifies the source in the style to which it is added.
sourceThe source from which to obtain the data to style. If the source has not yet been added to the current style, the behavior is undefined.
Return Value
An initialized foreground style layer.
 
- 
                  
                  
If true, the icon will be visible even if it collides with other previously drawn symbols.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containingNO. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.This attribute corresponds to the
icon-allow-overlaplayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconAllowsOverlap;Swift
var iconAllowsOverlap: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Part of the icon placed closest to the anchor.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLIconAnchorCenter. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconAnchor;Swift
var iconAnchor: MGLStyleValue<NSValue>! { get set } - 
                  
                  
If true, other symbols can be visible even if they collide with the icon.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containingNO. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.This attribute corresponds to the
icon-ignore-placementlayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconIgnoresPlacement;Swift
var iconIgnoresPlacement: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Name of image in sprite to use for drawing an image background. A string with {tokens} replaced, referencing the data property to pull from.
This attribute corresponds to the
icon-imagelayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSString *> *iconImageName;Swift
var iconImageName: MGLStyleValue<NSString>! { get set } - 
                  
                  
Offset distance of icon from its anchor.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containing aCGVectorstruct set to 0 rightward and 0 upward. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconOffset;Swift
var iconOffset: MGLStyleValue<NSValue>! { get set } - 
                  
                  
If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containingNO. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil, andtextis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (getter=isIconOptional, assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconOptional;Swift
var iconOptional: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Size of the additional area around the icon bounding box used for detecting symbol collisions.
This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float2. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconPadding;Swift
var iconPadding: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Orientation of icon when map is pitched.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLIconPitchAlignmentAuto. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconPitchAlignment;Swift
var iconPitchAlignment: MGLStyleValue<NSValue>! { get set } - 
                  
                  
Rotates the icon clockwise.
This property is measured in degrees.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float0. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.This attribute corresponds to the
icon-rotatelayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconRotation;Swift
var iconRotation: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
In combination with
symbolPlacement, determines the rotation behavior of icons.The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLIconRotationAlignmentAuto. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconRotationAlignment;Swift
var iconRotationAlignment: MGLStyleValue<NSValue>! { get set } - 
                  
                  
Scales the original size of the icon by the provided factor. The new point size of the image will be the original point size multiplied by
iconSize. 1 is the original size; 3 triples the size of the image.This property is measured in factor of the original icon sizes.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float1. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.This attribute corresponds to the
icon-sizelayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconScale;Swift
var iconScale: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Scales the icon to fit around the associated text.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLIconTextFitNone. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil, andtextis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTextFit;Swift
var iconTextFit: MGLStyleValue<NSValue>! { get set } - 
                  
                  
Size of the additional area added to dimensions determined by
iconTextFit.This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingNSEdgeInsetsZero. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil, andtextis non-nil, andiconTextFitis set to anMGLStyleValueobject containing anNSValueobject containingMGLIconTextFitBoth,MGLIconTextFitWidth, orMGLIconTextFitHeight. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTextFitPadding;Swift
var iconTextFitPadding: MGLStyleValue<NSValue>! { get set } - 
                  
                  
If true, the icon may be flipped to prevent it from being rendered upside-down.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containingNO. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil, andiconRotationAlignmentis set to anMGLStyleValueobject containing anNSValueobject containingMGLIconRotationAlignmentMap, andsymbolPlacementis set to anMGLStyleValueobject containing anNSValueobject containingMGLSymbolPlacementLine. Otherwise, it is ignored.This attribute corresponds to the
icon-keep-uprightlayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *keepsIconUpright;Swift
var keepsIconUpright: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
If true, the text may be flipped vertically to prevent it from being rendered upside-down.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containingYES. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil, andtextRotationAlignmentis set to anMGLStyleValueobject containing anNSValueobject containingMGLTextRotationAlignmentMap, andsymbolPlacementis set to anMGLStyleValueobject containing anNSValueobject containingMGLSymbolPlacementLine. Otherwise, it is ignored.This attribute corresponds to the
text-keep-uprightlayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *keepsTextUpright;Swift
var keepsTextUpright: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Maximum angle change between adjacent characters.
This property is measured in degrees.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float45. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil, andsymbolPlacementis set to anMGLStyleValueobject containing anNSValueobject containingMGLSymbolPlacementLine. Otherwise, it is ignored.This attribute corresponds to the
text-max-anglelayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumTextAngle;Swift
var maximumTextAngle: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
The maximum line width for text wrapping.
This property is measured in ems.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float10. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.This attribute corresponds to the
text-max-widthlayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumTextWidth;Swift
var maximumTextWidth: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don’t have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containingNO. Set this property tonilto reset it to the default value.This attribute corresponds to the
symbol-avoid-edgeslayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolAvoidsEdges;Swift
var symbolAvoidsEdges: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Label placement relative to its geometry.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLSymbolPlacementPoint. Set this property tonilto reset it to the default value.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *symbolPlacement;Swift
var symbolPlacement: MGLStyleValue<NSValue>! { get set } - 
                  
                  
Distance between two symbol anchors.
This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float250. Set this property tonilto reset it to the default value.This property is only applied to the style if
symbolPlacementis set to anMGLStyleValueobject containing anNSValueobject containingMGLSymbolPlacementLine. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolSpacing;Swift
var symbolSpacing: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Value to use for a text label. Feature properties are specified using tokens like {field_name}. (Token replacement is only supported for literal
textFieldvalues–not for property functions.)The default value of this property is an
MGLStyleValueobject containing the empty string. Set this property tonilto reset it to the default value.This attribute corresponds to the
text-fieldlayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSString *> *text;Swift
var text: MGLStyleValue<NSString>! { get set } - 
                  
                  
If true, the text will be visible even if it collides with other previously drawn symbols.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containingNO. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.This attribute corresponds to the
text-allow-overlaplayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textAllowsOverlap;Swift
var textAllowsOverlap: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Part of the text placed closest to the anchor.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLTextAnchorCenter. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *textAnchor;Swift
var textAnchor: MGLStyleValue<NSValue>! { get set } - 
                  
                  
An array of font face names used to display the text.
Each font name must be included in the
{fontstack}portion of the JSON stylesheet’sglyphsproperty. You can register a custom font when designing the style in Mapbox Studio. Fonts installed on the system are not used.The first font named in the array is applied to the text. For each character in the text, if the first font lacks a glyph for the character, the next font is applied as a fallback, and so on.
The default value of this property is an
MGLStyleValueobject containing the arrayOpen Sans Regular,Arial Unicode MS Regular. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.This attribute corresponds to the
text-fontlayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSArray<NSString *> *> *textFontNames;Swift
var textFontNames: MGLStyleValue<NSArray>! { get set } - 
                  
                  
Font size.
This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float16. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.This attribute corresponds to the
text-sizelayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textFontSize;Swift
var textFontSize: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
If true, other symbols can be visible even if they collide with the text.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containingNO. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.This attribute corresponds to the
text-ignore-placementlayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textIgnoresPlacement;Swift
var textIgnoresPlacement: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Text justification options.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLTextJustificationCenter. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.This attribute corresponds to the
text-justifylayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *textJustification;Swift
var textJustification: MGLStyleValue<NSValue>! { get set } - 
                  
                  
Text tracking amount.
This property is measured in ems.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float0. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textLetterSpacing;Swift
var textLetterSpacing: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Text leading value for multi-line text.
This property is measured in ems.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float1.2. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textLineHeight;Swift
var textLineHeight: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Offset distance of text from its anchor.
This property is measured in ems.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containing aCGVectorstruct set to 0 ems rightward and 0 ems upward. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *textOffset;Swift
var textOffset: MGLStyleValue<NSValue>! { get set } - 
                  
                  
If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containingNO. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil, andiconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (getter=isTextOptional, assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textOptional;Swift
var textOptional: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Size of the additional area around the text bounding box used for detecting symbol collisions.
This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float2. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textPadding;Swift
var textPadding: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
Orientation of text when map is pitched.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLTextPitchAlignmentAuto. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *textPitchAlignment;Swift
var textPitchAlignment: MGLStyleValue<NSValue>! { get set } - 
                  
                  
Rotates the text clockwise.
This property is measured in degrees.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float0. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.This attribute corresponds to the
text-rotatelayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textRotation;Swift
var textRotation: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
In combination with
symbolPlacement, determines the rotation behavior of the individual glyphs forming the text.The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLTextRotationAlignmentAuto. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *textRotationAlignment;Swift
var textRotationAlignment: MGLStyleValue<NSValue>! { get set } - 
                  
                  
Specifies how to capitalize text.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLTextTransformNone. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTransform;Swift
var textTransform: MGLStyleValue<NSValue>! { get set } 
- 
                  
                  
The tint color to apply to the icon. The
iconImageNameproperty must be set to a template image.The default value of this property is an
MGLStyleValueobject containingNSColor.blackColor. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSColor *> *iconColor;Swift
var iconColor: MGLStyleValue<NSColor>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
iconColorproperty.This property corresponds to the
icon-color-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition iconColorTransition;Swift
var iconColorTransition: MGLTransition { get set } - 
                  
                  
Fade out the halo towards the outside.
This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float0. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconHaloBlur;Swift
var iconHaloBlur: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
iconHaloBlurproperty.This property corresponds to the
icon-halo-blur-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition iconHaloBlurTransition;Swift
var iconHaloBlurTransition: MGLTransition { get set } - 
                  
                  
The color of the icon’s halo. The
iconImageNameproperty must be set to a template image.The default value of this property is an
MGLStyleValueobject containingNSColor.clearColor. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSColor *> *iconHaloColor;Swift
var iconHaloColor: MGLStyleValue<NSColor>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
iconHaloColorproperty.This property corresponds to the
icon-halo-color-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition iconHaloColorTransition;Swift
var iconHaloColorTransition: MGLTransition { get set } - 
                  
                  
Distance of halo to the icon outline.
This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float0. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconHaloWidth;Swift
var iconHaloWidth: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
iconHaloWidthproperty.This property corresponds to the
icon-halo-width-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition iconHaloWidthTransition;Swift
var iconHaloWidthTransition: MGLTransition { get set } - 
                  
                  
The opacity at which the icon will be drawn.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float1. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconOpacity;Swift
var iconOpacity: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
iconOpacityproperty.This property corresponds to the
icon-opacity-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition iconOpacityTransition;Swift
var iconOpacityTransition: MGLTransition { get set } - 
                  
                  
Distance that the icon’s anchor is moved from its original placement.
This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containing aCGVectorstruct set to 0 points rightward and 0 points upward. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil. Otherwise, it is ignored.This attribute corresponds to the
icon-translatelayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslation;Swift
var iconTranslation: MGLStyleValue<NSValue>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
iconTranslationproperty.This property corresponds to the
icon-translate-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition iconTranslationTransition;Swift
var iconTranslationTransition: MGLTransition { get set } - 
                  
                  
Controls the translation reference point.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLIconTranslationAnchorMap. Set this property tonilto reset it to the default value.This property is only applied to the style if
iconImageNameis non-nil, andiconTranslationis non-nil. Otherwise, it is ignored.This attribute corresponds to the
icon-translate-anchorlayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslationAnchor;Swift
var iconTranslationAnchor: MGLStyleValue<NSValue>! { get set } - 
                  
                  
The color with which the text will be drawn.
The default value of this property is an
MGLStyleValueobject containingNSColor.blackColor. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSColor *> *textColor;Swift
var textColor: MGLStyleValue<NSColor>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
textColorproperty.This property corresponds to the
text-color-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition textColorTransition;Swift
var textColorTransition: MGLTransition { get set } - 
                  
                  
The halo’s fadeout distance towards the outside.
This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float0. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textHaloBlur;Swift
var textHaloBlur: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
textHaloBlurproperty.This property corresponds to the
text-halo-blur-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition textHaloBlurTransition;Swift
var textHaloBlurTransition: MGLTransition { get set } - 
                  
                  
The color of the text’s halo, which helps it stand out from backgrounds.
The default value of this property is an
MGLStyleValueobject containingNSColor.clearColor. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSColor *> *textHaloColor;Swift
var textHaloColor: MGLStyleValue<NSColor>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
textHaloColorproperty.This property corresponds to the
text-halo-color-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition textHaloColorTransition;Swift
var textHaloColorTransition: MGLTransition { get set } - 
                  
                  
Distance of halo to the font outline. Max text halo width is ¼ of the font-size.
This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float0. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textHaloWidth;Swift
var textHaloWidth: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
textHaloWidthproperty.This property corresponds to the
text-halo-width-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition textHaloWidthTransition;Swift
var textHaloWidthTransition: MGLTransition { get set } - 
                  
                  
The opacity at which the text will be drawn.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float1. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
MGLSourceStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategoricalMGLInterpolationModeIdentity
MGLCompositeStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeIntervalMGLInterpolationModeCategorical
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textOpacity;Swift
var textOpacity: MGLStyleValue<NSNumber>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
textOpacityproperty.This property corresponds to the
text-opacity-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition textOpacityTransition;Swift
var textOpacityTransition: MGLTransition { get set } - 
                  
                  
Distance that the text’s anchor is moved from its original placement.
This property is measured in points.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containing aCGVectorstruct set to 0 points rightward and 0 points upward. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil. Otherwise, it is ignored.This attribute corresponds to the
text-translatelayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTranslation;Swift
var textTranslation: MGLStyleValue<NSValue>! { get set } - 
                  
                  
The transition affecting any changes to this layer’s
textTranslationproperty.This property corresponds to the
text-translate-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition textTranslationTransition;Swift
var textTranslationTransition: MGLTransition { get set } - 
                  
                  
Controls the translation reference point.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLTextTranslationAnchorMap. Set this property tonilto reset it to the default value.This property is only applied to the style if
textis non-nil, andtextTranslationis non-nil. Otherwise, it is ignored.This attribute corresponds to the
text-translate-anchorlayout property in the Mapbox Style Specification.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
Declaration
Objective-C
@property (assign, readwrite, nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTranslationAnchor;Swift
var textTranslationAnchor: MGLStyleValue<NSValue>! { get set } 
              Install in Dash
            
        MGLSymbolStyleLayer Class Reference