summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2018-04-19 13:24:12 -0700
committerjmkiley <jordan.kiley@mapbox.com>2018-04-19 13:24:12 -0700
commit0d34d6432d99af157d607d98038dea8689b1bc24 (patch)
treed34a92c29f4140ac7543bafefa8377e6cd483af2
parentb08a745ccb0bfb991a16c58f9e98b7f1d4bbdc3c (diff)
downloadqtlocation-mapboxgl-0d34d6432d99af157d607d98038dea8689b1bc24.tar.gz
[ios, macos] formatting
-rw-r--r--platform/darwin/docs/guides/Migrating to Expressions.md.ejs5
-rw-r--r--platform/ios/docs/guides/Migrating to Expressions.md7
-rw-r--r--platform/ios/jazzy.yml2
3 files changed, 8 insertions, 6 deletions
diff --git a/platform/darwin/docs/guides/Migrating to Expressions.md.ejs b/platform/darwin/docs/guides/Migrating to Expressions.md.ejs
index b7544c33e1..435a9d4a65 100644
--- a/platform/darwin/docs/guides/Migrating to Expressions.md.ejs
+++ b/platform/darwin/docs/guides/Migrating to Expressions.md.ejs
@@ -58,7 +58,7 @@ The example below increases a layer’s `circleRadius` exponentially based on a
### Interval
-Steps, or intervals, create a range using the keys from the stops dictionary. The range is from the given key to just less than the next key. The attribute values that fall into that range are then styled using the layout or paint value assigned to that key. You can use the format string `'mgl_step:from:stops:'` for cases where you previously used interval interpolation mode. The first parameter takes the feature attribute name and the second parameter (`from:`) optionally takes the default or fallback value for that function. The final parameter takes a stops dictionary as an argument.
+Steps, or intervals, create a range using the keys from the stops dictionary. The range is from the given key to just less than the next key. The attribute values that fall into that range are then styled using the layout or paint value assigned to that key. You can use the format string `'mgl_step:from:stops:'` for cases where you previously used interval interpolation mode. The first parameter takes the feature attribute name and the second parameter (`from:`) optionally takes the default or fallback value for that function. The final parameter takes a stops dictionary as an argument.
When we use the stops dictionary given above with an `'mgl_step:from:stops:'`, we create ranges where earthquakes with a magnitude of 0 to just less than 2.5 would be yellow, 2.5 to just less than 5 would be orange, and so on.
<%- guideExample(guide, 'Interval', os) %>
@@ -97,12 +97,13 @@ You can also cast attribute values in order to use them. One example is to cast
![cast a value](img/data-driven-styling/cast.png)
-## Constant Values
+### Constant Values
<% if (iOS) { -%>
For constant values that do not necessarily change based on camera or attribute values, use `[NSExpression expressionForConstantValue:]` (previously `[MGLStyleValue valueWithRawValue:]`).
<% } -%>
+
## Resources
* [USGS](https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php)
diff --git a/platform/ios/docs/guides/Migrating to Expressions.md b/platform/ios/docs/guides/Migrating to Expressions.md
index 976225edb9..2652bdc3cd 100644
--- a/platform/ios/docs/guides/Migrating to Expressions.md
+++ b/platform/ios/docs/guides/Migrating to Expressions.md
@@ -89,7 +89,7 @@ layer.circleRadius = NSExpression(format: "mgl_interpolate:withCurveType:paramet
### Interval
-Steps, or intervals, create a range using the keys from the stops dictionary. The range is from the given key to just less than the next key. The attribute values that fall into that range are then styled using the layout or paint value assigned to that key. You can use the format string `'mgl_step:from:stops:'` for cases where you previously used interval interpolation mode. The first parameter takes the feature attribute name and the second parameter (`from:`) optionally takes the default or fallback value for that function. The final parameter takes a stops dictionary as an argument.
+Steps, or intervals, create a range using the keys from the stops dictionary. The range is from the given key to just less than the next key. The attribute values that fall into that range are then styled using the layout or paint value assigned to that key. You can use the format string `'mgl_step:from:stops:'` for cases where you previously used interval interpolation mode. The first parameter takes the feature attribute name and the second parameter (`from:`) optionally takes the default or fallback value for that function. The final parameter takes a stops dictionary as an argument.
When we use the stops dictionary given above with an `'mgl_step:from:stops:'`, we create ranges where earthquakes with a magnitude of 0 to just less than 2.5 would be yellow, 2.5 to just less than 5 would be orange, and so on.
```swift
@@ -151,11 +151,12 @@ mapView.style?.addLayer(magnitudeLayer)
![cast a value](img/data-driven-styling/cast.png)
-## Constant Values
+### Constant Values
For constant values that do not necessarily change based on camera or attribute values, use `[NSExpression expressionForConstantValue:]` (previously `[MGLStyleValue valueWithRawValue:]`).
- ## Resources
+
+## Resources
* [USGS](https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php)
* [For Style Authors](for-style-authors.html)
diff --git a/platform/ios/jazzy.yml b/platform/ios/jazzy.yml
index fb3ea4be34..34dcc1f50b 100644
--- a/platform/ios/jazzy.yml
+++ b/platform/ios/jazzy.yml
@@ -19,7 +19,7 @@ custom_categories:
children:
- Adding Markers to a Map
- Runtime Styling
- - Style Layers Using Expressions
+ - Migrating to Expressions
- Working with Mapbox Studio
- Working with GeoJSON Data
- Predicates and Expressions