diff options
author | Jordan Kiley <jmkiley@users.noreply.github.com> | 2017-03-17 19:13:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 19:13:24 -0400 |
commit | 789a49d46d5511cfe6b6631a7f9f0a5fed1aefbb (patch) | |
tree | bbc0301a9b945156ab03d95b5a5b1c2f0c5b9caa /platform/darwin/docs/guides/For Style Authors.md.ejs | |
parent | 41dec13573c2533488c29028d2d6bcb9075d3a52 (diff) | |
download | qtlocation-mapboxgl-789a49d46d5511cfe6b6631a7f9f0a5fed1aefbb.tar.gz |
[ios, macos] update iOS SDK guides (#8354)
- Added DDS guide
- Updated "For Style Authors" guide
Diffstat (limited to 'platform/darwin/docs/guides/For Style Authors.md.ejs')
-rw-r--r-- | platform/darwin/docs/guides/For Style Authors.md.ejs | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs index 60797967d0..92ce4c1594 100644 --- a/platform/darwin/docs/guides/For Style Authors.md.ejs +++ b/platform/darwin/docs/guides/For Style Authors.md.ejs @@ -8,7 +8,7 @@ -%> <!-- This file is generated. - Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. + Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`. --> # Information for Style Authors @@ -41,7 +41,7 @@ underneath. <% if (iOS) { -%> The user location annotation view, the attribution button, any buttons in callout views, and any items in the navigation bar are influenced by your -application’s tint color, so choose a tint color that constrasts well with your +application’s tint color, so choose a tint color that contrasts well with your map style. <% } -%> If you intend your style to be used in the dark, consider the impact that Night @@ -160,6 +160,7 @@ In the style specification | In the SDK ---------------------------|--------- class | style class filter | predicate +function type | interpolation mode id | identifier image | style image layer | style layer @@ -239,6 +240,30 @@ whose names differ from the style specification are listed below: <% for (const type in renamedProperties) { -%> <% if (renamedProperties.hasOwnProperty(type)) { -%> +### <%- camelize(type) %> style functions + +The runtime styling API introduces `MGLStyleFunction` to the <%- os %> SDK. +[Data-driven styling](data-driven-styling.html) expands `MGLStyleFunction`. +Individual style property documentation includes which subclasses of +`MGLStyleFunction` are enabled for that property. You can use `MGLStyleValue` +methods to create a `MGLStyleFunction`. + +In style specification | In the SDK | [MGLStyleValue valueWithInterpolationMode:...] +-----------------------|-------------------------------|------------- +`zoom function` | `MGLCameraStyleFunction` | `cameraStops:options:` +`property function` | `MGLSourceStyleFunction` | `sourceStops:attributeName:options:` +`zoom-and-property functions`| `MGLCompositeStyleFunction` | `compositeStops:attributeName:options:` + +Data-driven styling also introduces interpolation mode, which defines the +relationship between style values and attributes or zoom levels. + +In style specification | In the SDK +-----------------------------|----------- +`exponential` | `MGLInterpolationModeExponential` +`interval` | `MGLInterpolationModeInterval` +`categorical` | `MGLInterpolationModeCategorical` +`identity` | `MGLInterpolationModeIdentity` + ### <%- camelize(type) %> style layers In style JSON | In Objective-C | In Swift |