summaryrefslogtreecommitdiff
path: root/platform/darwin/docs/guides/For Style Authors.md.ejs
diff options
context:
space:
mode:
authorFabian Guerra Soto <fabian.guerra@mapbox.com>2019-03-19 14:53:35 -0700
committerGitHub <noreply@github.com>2019-03-19 14:53:35 -0700
commit174c8fa7e4927ebf28a3d0e07c995d3e3d69de76 (patch)
treef503bdf15e24f9c744f634107fc04c6338d1c42d /platform/darwin/docs/guides/For Style Authors.md.ejs
parent10e1e63aee95f579f951e3c2001640a268d3d95c (diff)
downloadqtlocation-mapboxgl-174c8fa7e4927ebf28a3d0e07c995d3e3d69de76.tar.gz
[ios, macos] Add text-color support to format expressions. (#14146)
Added the possibility of overriding paint properties inside the format expression. Added an example of how to create an MGLAttributedExpression object and documented the attributes keys and value types. Fixed a bug that ignored the font names.
Diffstat (limited to 'platform/darwin/docs/guides/For Style Authors.md.ejs')
-rw-r--r--platform/darwin/docs/guides/For Style Authors.md.ejs11
1 files changed, 11 insertions, 0 deletions
diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs
index cf0f79f419..cff6e2f41c 100644
--- a/platform/darwin/docs/guides/For Style Authors.md.ejs
+++ b/platform/darwin/docs/guides/For Style Authors.md.ejs
@@ -431,5 +431,16 @@ In style JSON | In the format string
`["any", f0, …, fn]` | `p0 OR … OR pn`
`["none", f0, …, fn]` | `NOT (p0 OR … OR pn)`
+## Specifying the text format
+
+The following format attributes are defined as `NSString` constans that you
+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`
+`text-color` | `MGLFontColorAttribute` | `.fontColorAttribute`
+
See the “[Predicates and Expressions](predicates-and-expressions.html)” guide for
a full description of the supported operators and operand types.