summaryrefslogtreecommitdiff
path: root/platform/darwin/docs
diff options
context:
space:
mode:
authorFabian Guerra Soto <fabian.guerra@mapbox.com>2019-03-22 13:45:39 -0700
committerGitHub <noreply@github.com>2019-03-22 13:45:39 -0700
commit1d7b243a06c6c3d2def4d1989e93e90250e87cad (patch)
tree05394b1f3aaa53b13dfa73bfd5b2ebd918933f98 /platform/darwin/docs
parentc78b60bf356ad36fc36bce24a184e046cc8066bb (diff)
downloadqtlocation-mapboxgl-1d7b243a06c6c3d2def4d1989e93e90250e87cad.tar.gz
[ios, macos] Support expressions in formatting parameters. (#14198)
Modified MGLAttributedExpression object to support NSExpressions as formatting attributes only. This aligns with GL and Android implementation and specification. Modified the documentation accordingly, and changed MGLFontSizeAttribute to MGLFontScaleAttribute to clarify the true function of the formatting parameter.
Diffstat (limited to 'platform/darwin/docs')
-rw-r--r--platform/darwin/docs/guides/For Style Authors.md.ejs2
-rw-r--r--platform/darwin/docs/guides/Predicates and Expressions.md6
2 files changed, 4 insertions, 4 deletions
diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs
index cff6e2f41c..8df541d0f7 100644
--- a/platform/darwin/docs/guides/For Style Authors.md.ejs
+++ b/platform/darwin/docs/guides/For Style Authors.md.ejs
@@ -439,7 +439,7 @@ can use to update the formatting of `MGLSymbolStyleLayer.text` property.
In style JSON | In Objective-C | In Swift
--------------|-----------------------|---------
`text-font` | `MGLFontNamesAttribute` | `.fontNamesAttribute`
-`font-scale` | `MGLFontSizeAttribute` | `.fontSizeAttribute`
+`font-scale` | `MGLFontScaleAttribute` | `.fontScaleAttribute`
`text-color` | `MGLFontColorAttribute` | `.fontColorAttribute`
See the “[Predicates and Expressions](predicates-and-expressions.html)” guide for
diff --git a/platform/darwin/docs/guides/Predicates and Expressions.md b/platform/darwin/docs/guides/Predicates and Expressions.md
index 51617c8508..b2e01b94db 100644
--- a/platform/darwin/docs/guides/Predicates and Expressions.md
+++ b/platform/darwin/docs/guides/Predicates and Expressions.md
@@ -550,9 +550,9 @@ with the `MGLSymbolStyleLayer.text` property.
Key | Value Type
--- | ---
- `MGLFontNamesAttribute` | `NSArray<NSString *>*`
- `MGLFontSizeAttribute` | `NSNumber`
- `MGLFontColorAttribute` | `UIColor` or `NSColor` on macos
+ `MGLFontNamesAttribute` | An `NSExpression` evaluating to an `NSString` array.
+ `MGLFontScaleAttribute` | An `NSExpression` evaluating to an `NSNumber` value.
+ `MGLFontColorAttribute` | An `NSExpression` evaluating to an `UIColor` (iOS) or `NSColor` (macOS).
This function corresponds to the
[`format`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-types-format)