diff options
author | ryanhamley <ryan.hamley@mapbox.com> | 2018-08-30 17:18:29 -0700 |
---|---|---|
committer | ryanhamley <ryan.hamley@mapbox.com> | 2018-09-07 13:05:19 -0700 |
commit | 31cca05fc6a9d08d3b0028149f7ef2f2348b18e9 (patch) | |
tree | 0fc6980686269d0deade28823be33bf9446610a7 /platform/darwin/src/MGLSymbolStyleLayer.h | |
parent | 79bf0e8af6bf9ec829a352d56b8e70ccc8f4fa41 (diff) | |
download | qtlocation-mapboxgl-31cca05fc6a9d08d3b0028149f7ef2f2348b18e9.tar.gz |
Port symbol-z-order symbol layout style-spec property to Nativeupstream/sort-by-y
Diffstat (limited to 'platform/darwin/src/MGLSymbolStyleLayer.h')
-rw-r--r-- | platform/darwin/src/MGLSymbolStyleLayer.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h index afaea9a74f..363f9efee7 100644 --- a/platform/darwin/src/MGLSymbolStyleLayer.h +++ b/platform/darwin/src/MGLSymbolStyleLayer.h @@ -151,6 +151,26 @@ typedef NS_ENUM(NSUInteger, MGLSymbolPlacement) { }; /** + Controls the order in which overlapping symbols in the same layer are rendered + + Values of this type are used in the `MGLSymbolStyleLayer.symbolZOrder` + property. + */ +typedef NS_ENUM(NSUInteger, MGLSymbolZOrder) { + /** + Specify this z order if symbols’ appearance relies on lower features + overlapping higher features. For example, symbols with a pin-like + appearance would require this z order. + */ + MGLSymbolZOrderViewportY, + /** + Specify this z order if the order in which features appear in the source is + significant. + */ + MGLSymbolZOrderSource, +}; + +/** Part of the text placed closest to the anchor. Values of this type are used in the `MGLSymbolStyleLayer.textAnchor` @@ -1005,6 +1025,32 @@ MGL_EXPORT @property (nonatomic, null_resettable) NSExpression *symbolSpacing; /** + Controls the order in which overlapping symbols in the same layer are rendered + + The default value of this property is an expression that evaluates to + `viewport-y`. Set this property to `nil` to reset it to the default value. + + You can set this property to an expression containing any of the following: + + * Constant `MGLSymbolZOrder` values + * Any of the following constant string values: + * `viewport-y`: Specify this z order if symbols’ appearance relies on lower + features overlapping higher features. For example, symbols with a pin-like + appearance would require this z order. + * `source`: Specify this z order if the order in which features appear in the + source is significant. + * Predefined functions, including mathematical and string operators + * Conditional expressions + * Variable assignments and references to assigned variables + * Step functions applied to the `$zoomLevel` variable + + This property does not support applying interpolation functions to the + `$zoomLevel` variable or applying interpolation or step functions to feature + attributes. + */ +@property (nonatomic, null_resettable) NSExpression *symbolZOrder; + +/** Value to use for a text label. Within a constant string value, a feature attribute name enclosed in curly @@ -2141,6 +2187,19 @@ MGL_EXPORT @property (readonly) MGLSymbolPlacement MGLSymbolPlacementValue; /** + Creates a new value object containing the given `MGLSymbolZOrder` enumeration. + + @param symbolZOrder The value for the new object. + @return A new value object that contains the enumeration value. + */ ++ (instancetype)valueWithMGLSymbolZOrder:(MGLSymbolZOrder)symbolZOrder; + +/** + The `MGLSymbolZOrder` enumeration representation of the value. + */ +@property (readonly) MGLSymbolZOrder MGLSymbolZOrderValue; + +/** Creates a new value object containing the given `MGLTextAnchor` enumeration. @param textAnchor The value for the new object. |