Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Add alternative variable reference syntax for NSExpression #11010

Closed
1ec5 opened this issue Jan 24, 2018 · 1 comment
Closed

Add alternative variable reference syntax for NSExpression #11010

1ec5 opened this issue Jan 24, 2018 · 1 comment
Labels
iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jan 24, 2018

The NSExpression-based property value implementation in #10726 uses the $dollar syntax to represent both references to variables and the built-in variables $zoomLevel and $heatmapDensity. (Natively, $dollar syntax is used for references to state that may change from one evaluation context to another.) In the unlikely event that a style needs to refer to a custom zoomLevel or heatmapDensity variable, we should have a fallback syntax, such as a custom variable function.

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling labels Jan 24, 2018
@1ec5
Copy link
Contributor Author

1ec5 commented Apr 14, 2018

As of #11472, MGL_FUNCTION('var', 'zoom') is available in case the developer needs to refer to a variable named zoomLevel rather than the actual zoom level.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling
Projects
None yet
Development

No branches or pull requests

1 participant