summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Guerra <fabian.guerra@mapbox.com>2019-03-13 17:45:37 -0700
committerFabian Guerra <fabian.guerra@mapbox.com>2019-03-14 12:59:45 -0700
commit97268ca61647b4cd0721bcbefccbc2490c0a6bbe (patch)
tree4a219c1f78a02cac4a31ed4ffeb20838da77a202
parent89eca912f1e139ae1a3dea80c09aa850772c1193 (diff)
downloadqtlocation-mapboxgl-97268ca61647b4cd0721bcbefccbc2490c0a6bbe.tar.gz
[ios, macos] Update predicates and expression documentation.
-rw-r--r--platform/darwin/docs/guides/For Style Authors.md.ejs1
-rw-r--r--platform/darwin/docs/guides/Predicates and Expressions.md15
-rw-r--r--platform/darwin/src/MGLAttributedExpression.h2
-rw-r--r--platform/ios/docs/guides/For Style Authors.md1
-rw-r--r--platform/macos/docs/guides/For Style Authors.md1
5 files changed, 19 insertions, 1 deletions
diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs
index ead3b81ce6..764ba2e018 100644
--- a/platform/darwin/docs/guides/For Style Authors.md.ejs
+++ b/platform/darwin/docs/guides/For Style Authors.md.ejs
@@ -403,6 +403,7 @@ In style specification | Method, function, or predicate type | Format string syn
`zoom` | `NSExpression.zoomLevelVariableExpression` | `$zoomLevel`
`heatmap-density` | `NSExpression.heatmapDensityVariableExpression` | `$heatmapDensity`
`line-progress` | `NSExpression.lineProgressVariableExpression` | `$lineProgress`
+`format` | `mgl_attributed:` | `mgl_attributed({x, y, z})`
For operators that have no corresponding `NSExpression` symbol, use the
`MGL_FUNCTION()` format string syntax.
diff --git a/platform/darwin/docs/guides/Predicates and Expressions.md b/platform/darwin/docs/guides/Predicates and Expressions.md
index 0bb26b3bfd..27bf35f712 100644
--- a/platform/darwin/docs/guides/Predicates and Expressions.md
+++ b/platform/darwin/docs/guides/Predicates and Expressions.md
@@ -534,6 +534,21 @@ This function corresponds to the
[`coalesce`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-coalesce)
operator in the Mapbox Style Specification.
+### `mgl_attributed:`
+
+<dl>
+<dt>Selector:</dt>
+<dd><code>mgl_attributed:</code></dd>
+<dt>Format string syntax:</dt>
+<dd><code>mgl_attributed({x, y, z})</code></dd>
+</dl>
+
+Returns formatted text containing annotations for use in mixed-format `text-field` entries.
+
+This function corresponds to the
+[`mgl_attributed`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-types-format)
+operator in the Mapbox Style Specification.
+
### `MGL_LET`
<dl>
diff --git a/platform/darwin/src/MGLAttributedExpression.h b/platform/darwin/src/MGLAttributedExpression.h
index 5f363efc90..fa3f61aabd 100644
--- a/platform/darwin/src/MGLAttributedExpression.h
+++ b/platform/darwin/src/MGLAttributedExpression.h
@@ -29,7 +29,7 @@ MGL_EXPORT
*/
- (instancetype)initWithExpression:(NSExpression *)expression;
-/**
+/**
Returns an `MGLAttributedExpression` object initialized with an expression and text format attributes.
*/
- (instancetype)initWithExpression:(NSExpression *)expression attributes:(nullable NSDictionary <MGLAttributedExpressionKey, id> *)attrs;
diff --git a/platform/ios/docs/guides/For Style Authors.md b/platform/ios/docs/guides/For Style Authors.md
index 72f326cc17..3c3738b647 100644
--- a/platform/ios/docs/guides/For Style Authors.md
+++ b/platform/ios/docs/guides/For Style Authors.md
@@ -390,6 +390,7 @@ In style specification | Method, function, or predicate type | Format string syn
`zoom` | `NSExpression.zoomLevelVariableExpression` | `$zoomLevel`
`heatmap-density` | `NSExpression.heatmapDensityVariableExpression` | `$heatmapDensity`
`line-progress` | `NSExpression.lineProgressVariableExpression` | `$lineProgress`
+`format` | `mgl_attributed:` | `mgl_attributed({x, y, z})`
For operators that have no corresponding `NSExpression` symbol, use the
`MGL_FUNCTION()` format string syntax.
diff --git a/platform/macos/docs/guides/For Style Authors.md b/platform/macos/docs/guides/For Style Authors.md
index fdba68879c..6a167c7abf 100644
--- a/platform/macos/docs/guides/For Style Authors.md
+++ b/platform/macos/docs/guides/For Style Authors.md
@@ -383,6 +383,7 @@ In style specification | Method, function, or predicate type | Format string syn
`zoom` | `NSExpression.zoomLevelVariableExpression` | `$zoomLevel`
`heatmap-density` | `NSExpression.heatmapDensityVariableExpression` | `$heatmapDensity`
`line-progress` | `NSExpression.lineProgressVariableExpression` | `$lineProgress`
+`format` | `mgl_attributed:` | `mgl_attributed({x, y, z})`
For operators that have no corresponding `NSExpression` symbol, use the
`MGL_FUNCTION()` format string syntax.