-
Whether extruded geometries are lit relative to the map or viewport.
The default value of this property is an
MGLStyleValueobject containing anNSValueobject containingMGLLightAnchorViewport.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode ofMGLInterpolationModeInterval
This property corresponds to the
anchorlight property in the Mapbox Style Specification.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLStyleValue<NSValue *> *_Nonnull anchor;Swift
var anchor: MGLStyleValue -
Position of the
MGLLightsource relative to lit (extruded) geometries, in aMGLSphericalPositionstruct [radial coordinate, azimuthal angle, polar angle] where radial indicates the distance from the center of the base of an object to its light, azimuthal indicates the position of the light relative to 0° (0° whenMGLLight.anchoris set toMGLLightAnchorViewportcorresponds to the top of the viewport, or 0° whenMGLLight.anchoris set toMGLLightAnchorMapcorresponds to due north, and degrees proceed clockwise), and polar indicates the height of the light (from 0°, directly above, to 180°, directly below).The default value of this property is an
MGLStyleValueobject containing anMGLSphericalPositionstruct set to 1.15 radial, 210 azimuthal and 30 polar.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
This property corresponds to the
positionlight property in the Mapbox Style Specification.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLStyleValue<NSValue *> *_Nonnull position;Swift
var position: MGLStyleValue -
The transition affecting any changes to this layer’s
positionproperty.This property corresponds to the
position-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition positionTransition;Swift
var positionTransition: MGLTransition { get set } -
Color tint for lighting extruded geometries.
The default value of this property is an
MGLStyleValueobject containingNSColor.whiteColor.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
This property corresponds to the
colorlight property in the Mapbox Style Specification.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLStyleValue<NSColor *> *_Nonnull color;Swift
var color: MGLStyleValue -
The transition affecting any changes to this layer’s
colorproperty.This property corresponds to the
color-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition colorTransition;Swift
var colorTransition: MGLTransition { get set } -
Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.
The default value of this property is an
MGLStyleValueobject containing anNSNumberobject containing the float0.5.You can set this property to an instance of:
MGLConstantStyleValueMGLCameraStyleFunctionwith an interpolation mode of:MGLInterpolationModeExponentialMGLInterpolationModeInterval
This property corresponds to the
intensitylight property in the Mapbox Style Specification.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLStyleValue<NSNumber *> *_Nonnull intensity;Swift
var intensity: MGLStyleValue -
The transition affecting any changes to this layer’s
intensityproperty.This property corresponds to the
intensity-transitionproperty in the style JSON file format.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLTransition intensityTransition;Swift
var intensityTransition: MGLTransition { get set }
Install in Dash
MGLLight Class Reference