From d25e2c772daeb44f3933a0114f41c86b9679e8c1 Mon Sep 17 00:00:00 2001 From: Jesse Bounds Date: Thu, 16 Feb 2017 19:46:00 -0800 Subject: [ios, macos] Rename MGLStyleConstantValue to MGLConstantStyleValue --- platform/ios/docs/guides/For Style Authors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/ios/docs/guides/For Style Authors.md') diff --git a/platform/ios/docs/guides/For Style Authors.md b/platform/ios/docs/guides/For Style Authors.md index a65d07bdd1..c1c74499b2 100644 --- a/platform/ios/docs/guides/For Style Authors.md +++ b/platform/ios/docs/guides/For Style Authors.md @@ -252,7 +252,7 @@ In style JSON | In Objective-C | In Swift ## Setting attribute values Each property representing a layout or paint attribute is set to an -`MGLStyleValue` object, which is either an `MGLStyleConstantValue` object (for +`MGLStyleValue` object, which is either an `MGLConstantStyleValue` object (for constant values) or an `MGLStyleFunction` object (for zoom level functions). The style value object is a container for the raw value or function parameters that you want the attribute to be set to. -- cgit v1.2.1 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 --- platform/ios/docs/guides/For Style Authors.md | 125 +++++++++++++++++++++++++- 1 file changed, 123 insertions(+), 2 deletions(-) (limited to 'platform/ios/docs/guides/For Style Authors.md') diff --git a/platform/ios/docs/guides/For Style Authors.md b/platform/ios/docs/guides/For Style Authors.md index c1c74499b2..952be6bec7 100644 --- a/platform/ios/docs/guides/For Style Authors.md +++ b/platform/ios/docs/guides/For Style Authors.md @@ -1,6 +1,6 @@ # Information for Style Authors @@ -28,7 +28,7 @@ make sure the contents of these elements remain legible with the map view underneath. 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 Shift may have on your style’s colors. @@ -109,6 +109,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 @@ -189,6 +190,30 @@ layer objects. The property names generally correspond to the style JSON properties, except for the use of camelCase instead of kebab-case. Properties whose names differ from the style specification are listed below: +### Circle style functions + +The runtime styling API introduces `MGLStyleFunction` to the iOS 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` + ### Circle style layers In style JSON | In Objective-C | In Swift @@ -197,6 +222,30 @@ In style JSON | In Objective-C | In Swift `circle-translate` | `MGLCircleStyleLayer.circleTranslation` | `MGLCircleStyleLayer.circleTranslation` `circle-translate-anchor` | `MGLCircleStyleLayer.circleTranslationAnchor` | `MGLCircleStyleLayer.circleTranslationAnchor` +### Fill style functions + +The runtime styling API introduces `MGLStyleFunction` to the iOS 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` + ### Fill style layers In style JSON | In Objective-C | In Swift @@ -205,6 +254,30 @@ In style JSON | In Objective-C | In Swift `fill-translate` | `MGLFillStyleLayer.fillTranslation` | `MGLFillStyleLayer.fillTranslation` `fill-translate-anchor` | `MGLFillStyleLayer.fillTranslationAnchor` | `MGLFillStyleLayer.fillTranslationAnchor` +### Line style functions + +The runtime styling API introduces `MGLStyleFunction` to the iOS 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` + ### Line style layers In style JSON | In Objective-C | In Swift @@ -213,6 +286,30 @@ In style JSON | In Objective-C | In Swift `line-translate` | `MGLLineStyleLayer.lineTranslation` | `MGLLineStyleLayer.lineTranslation` `line-translate-anchor` | `MGLLineStyleLayer.lineTranslationAnchor` | `MGLLineStyleLayer.lineTranslationAnchor` +### Raster style functions + +The runtime styling API introduces `MGLStyleFunction` to the iOS 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` + ### Raster style layers In style JSON | In Objective-C | In Swift @@ -221,6 +318,30 @@ In style JSON | In Objective-C | In Swift `raster-brightness-min` | `MGLRasterStyleLayer.minimumRasterBrightness` | `MGLRasterStyleLayer.minimumRasterBrightness` `raster-hue-rotate` | `MGLRasterStyleLayer.rasterHueRotation` | `MGLRasterStyleLayer.rasterHueRotation` +### Symbol style functions + +The runtime styling API introduces `MGLStyleFunction` to the iOS 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` + ### Symbol style layers In style JSON | In Objective-C | In Swift -- cgit v1.2.1