diff options
Diffstat (limited to 'platform/darwin/src/MGLLight.h')
-rw-r--r-- | platform/darwin/src/MGLLight.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLLight.h b/platform/darwin/src/MGLLight.h index 9694a18d0f..281fcc5c6e 100644 --- a/platform/darwin/src/MGLLight.h +++ b/platform/darwin/src/MGLLight.h @@ -60,6 +60,15 @@ NS_INLINE MGLSphericalPosition MGLSphericalPositionMake(CGFloat radial, CLLocati An `MGLLight` object represents the light source for extruded geometries in `MGLStyle`. + ### Example + ```swift + let light = MGLLight() + let position = MGLSphericalPosition(radial: 5, azimuthal: 180, polar: 80) + light.position = NSExpression(forConstantValue: NSValue(mglSphericalPosition: position)) + light.anchor = NSExpression(forConstantValue: "map") + mapView.style?.light = light + ``` + #### Related examples See the <a href="https://docs.mapbox.com/ios/maps/examples/light-example/">Adjust light of |