summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2018-04-19 15:45:15 -0700
committerjmkiley <jordan.kiley@mapbox.com>2018-04-19 15:45:15 -0700
commite717e34056d8c9598cfe4cd9aca4404bae682661 (patch)
tree4a33c4ded00ca6b214052cb97c4edbcfe523bbbf
parent2b6c3f25a2ee3c8cc4b941e3a073a2a09c68c4e4 (diff)
downloadqtlocation-mapboxgl-e717e34056d8c9598cfe4cd9aca4404bae682661.tar.gz
-rw-r--r--platform/darwin/docs/guides/Migrating to Expressions.md.ejs2
-rw-r--r--platform/ios/docs/guides/Migrating to Expressions.md11
-rw-r--r--platform/macos/docs/guides/Migrating to Expressions.md11
3 files changed, 2 insertions, 22 deletions
diff --git a/platform/darwin/docs/guides/Migrating to Expressions.md.ejs b/platform/darwin/docs/guides/Migrating to Expressions.md.ejs
index 144035a367..dd925c6495 100644
--- a/platform/darwin/docs/guides/Migrating to Expressions.md.ejs
+++ b/platform/darwin/docs/guides/Migrating to Expressions.md.ejs
@@ -77,8 +77,6 @@ There are three main types of events in the USGS dataset: earthquakes, explosion
If your use case does not require a default value, you can either apply a predicate to your layer prior to styling it, or use the format string `"valueForKeyPath:"``.
-<%- guideExample(guide, 'CategoricalValue', os) %>
-
![categorical mode](img/data-driven-styling/categorical1.png) ![categorical mode](img/data-driven-styling/categorical2.png)
### Identity
diff --git a/platform/ios/docs/guides/Migrating to Expressions.md b/platform/ios/docs/guides/Migrating to Expressions.md
index 58d5a963f5..dcc19113ec 100644
--- a/platform/ios/docs/guides/Migrating to Expressions.md
+++ b/platform/ios/docs/guides/Migrating to Expressions.md
@@ -44,7 +44,7 @@ The stops dictionary below, for example, shows colors that continuously shift fr
```swift
let url = URL(string: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.geojson")!
let symbolSource = MGLSource(identifier: "source")
-let symbolLayer = MGLSymbolStyleLayer(identifier: "place-city-sm", source: source)
+let symbolLayer = MGLSymbolStyleLayer(identifier: "place-city-sm", source: symbolSource)
let source = MGLShapeSource(identifier: "earthquakes", url: url, options: nil)
mapView.style?.addSource(source)
@@ -123,15 +123,6 @@ layer.circleColor = NSExpression(format: "MGL_MATCH(type, 'earthquake', %@, 'exp
If your use case does not require a default value, you can either apply a predicate to your layer prior to styling it, or use the format string `"valueForKeyPath:"``.
-```swift
-let stops : [String : UIColor] = ["earthquake" : UIColor.orange,
- "explosion" : UIColor.red,
- "quarry blast" : UIColor.yellow]
-layer.circleColor = NSExpression(
-format: "FUNCTION(%@, 'valueForKeyPath:', type)",
-stops)
-```
-
![categorical mode](img/data-driven-styling/categorical1.png) ![categorical mode](img/data-driven-styling/categorical2.png)
### Identity
diff --git a/platform/macos/docs/guides/Migrating to Expressions.md b/platform/macos/docs/guides/Migrating to Expressions.md
index be48acbfaf..6eaa1d2075 100644
--- a/platform/macos/docs/guides/Migrating to Expressions.md
+++ b/platform/macos/docs/guides/Migrating to Expressions.md
@@ -44,7 +44,7 @@ The stops dictionary below, for example, shows colors that continuously shift fr
```swift
let url = URL(string: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.geojson")!
let symbolSource = MGLSource(identifier: "source")
-let symbolLayer = MGLSymbolStyleLayer(identifier: "place-city-sm", source: source)
+let symbolLayer = MGLSymbolStyleLayer(identifier: "place-city-sm", source: symbolSource)
let source = MGLShapeSource(identifier: "earthquakes", url: url, options: nil)
mapView.style?.addSource(source)
@@ -124,15 +124,6 @@ format: "MGL_MATCH(type, 'earthquake', %@, 'explosion', %@, 'quarry blast', %@,
If your use case does not require a default value, you can either apply a predicate to your layer prior to styling it, or use the format string `"valueForKeyPath:"``.
-```swift
-let stops : [String : NSColor] = ["earthquake" : NSColor.orange,
- "explosion" : NSColor.red,
- "quarry blast" : NSColor.yellow]
-layer.circleColor = NSExpression(
-format: "FUNCTION(%@, 'valueForKeyPath:', type)",
-stops)
-```
-
![categorical mode](img/data-driven-styling/categorical1.png) ![categorical mode](img/data-driven-styling/categorical2.png)
### Identity