diff --git a/platform/ios/docs/guides/Data-Driven Styling.md b/platform/ios/docs/guides/Data-Driven Styling.md index e09959e6f8e..a4808603e90 100644 --- a/platform/ios/docs/guides/Data-Driven Styling.md +++ b/platform/ios/docs/guides/Data-Driven Styling.md @@ -8,8 +8,6 @@ To do - JK: - [ ] Add cocoaprefix so this can be moved to darwin ----> - - ##Data-Driven Styling Mapbox’s data-driven styling features allow you to use data properties to style your maps. You can style objects within the same layer differently based on their individual attributes. This enables you to style icons, routes, parks, and more based on attributes. @@ -25,10 +23,12 @@ This guide uses earthquake data from the [U.S. Geological Survey](https://earthq There are three subclasses of `MGLStyleFunction`: -* `MGLCameraStyleFunction` - For a style value that changes with zoom level. For example, you can make the radius of a circle to increase based on zoom level. In iOS SDK v3.4, a this was a `MGLStyleFunction`. +* `MGLCameraStyleFunction` - For a style value that changes with zoom level. For example, you can make the radius of a circle to increase based on zoom level. In iOS SDK v3.4, this was a `MGLStyleFunction`. * `MGLSourceStyleFunction` - For a style value that changes with the attributes of a feature. You can adjust the radius of a circle based on the magnitude of an earthquake, for example. * `MGLCompositeStyleFunction` - For a style value that changes with both zoom level and attribute values. For example, you can add a circle layer where each circle has a radius based on both zoom level and the magnitude of an earthquake. +The documentation for individual style properties will note which style functions are enabled for that property. + ####Stops Stops are key-value pairs that that determine a style value. With a `MGLCameraSourceFunction` stop, you can use a dictionary with a zoom level for a key and a `MGLStyleValue` for the value. For example, you can use a stops dictionary with zoom levels 0, 10, and 20 as keys, and yellow, orange, and red as the values. A `MGLSourceStyleFunction` uses the relevant attribute value as the key. @@ -81,7 +81,7 @@ layer.circleColor = MGLStyleValue(interpolationMode: .interval, options: [.defaultValue: MGLStyleValue(rawValue: .green)]) ``` ![interval mode](img/data-driven-styling/interval.png) - + #####Categorical Returns the output value that is equal to the stop for the function input. We’re going to use a different stops dictionary than we did for the previous two modes.