diff options
Diffstat (limited to 'platform/macos/docs/guides/Using Style Functions at Runtime.md')
-rw-r--r-- | platform/macos/docs/guides/Using Style Functions at Runtime.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/macos/docs/guides/Using Style Functions at Runtime.md b/platform/macos/docs/guides/Using Style Functions at Runtime.md index 4e854aaaa0..e87cd00185 100644 --- a/platform/macos/docs/guides/Using Style Functions at Runtime.md +++ b/platform/macos/docs/guides/Using Style Functions at Runtime.md @@ -66,7 +66,7 @@ let stops: [Float: NSColor] = [ ] let layer = MGLCircleStyleLayer(identifier: "circles", source: source) -layer.circleColor = NSExpression(format: "FUNCTION(mag, 'mgl_interpolateWithCurveType:parameters:stops:', 'linear', nil, %@)", +layer.circleColor = NSExpression(format: "mgl_interpolate:withCurveType:parameters:stops:(mag, 'linear', nil, %@)", stops) layer.circleRadius = NSExpression(forConstantValue: 10) mapView.style?.insertLayer(layer, below: symbolLayer) @@ -92,7 +92,7 @@ let stops = [ 18: 18, ] -layer.circleRadius = NSExpression(format: "FUNCTION($zoomLevel, 'mgl_interpolateWithCurveType:parameters:stops:', 'exponential', 1.5, %@)", +layer.circleRadius = NSExpression(format: "mgl_interpolate:withCurveType:parameters:stops:($zoomLevel, 'exponential', 1.5, %@)", stops) ``` @@ -111,7 +111,7 @@ let stops: [Float: NSColor] = [ 10: .white, ] -layer.circleColor = NSExpression(format: "FUNCTION(mag, 'mgl_stepWithMinimum:stops:', %@, %@)", +layer.circleColor = NSExpression(format: "mgl_step:from:stops:(mag, %@, %@)", NSColor.green, stops) ``` |