From 789a49d46d5511cfe6b6631a7f9f0a5fed1aefbb Mon Sep 17 00:00:00 2001 From: Jordan Kiley Date: Fri, 17 Mar 2017 19:13:24 -0400 Subject: [ios, macos] update iOS SDK guides (#8354) - Added DDS guide - Updated "For Style Authors" guide --- .../darwin/docs/guides/For Style Authors.md.ejs | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'platform/darwin/docs/guides/For Style Authors.md.ejs') 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 @@ -%> # 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 -- cgit v1.2.1