diff options
Diffstat (limited to 'platform/darwin/src/MGLSymbolStyleLayer.h')
-rw-r--r-- | platform/darwin/src/MGLSymbolStyleLayer.h | 174 |
1 files changed, 120 insertions, 54 deletions
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h index 621339db75..5a216e0354 100644 --- a/platform/darwin/src/MGLSymbolStyleLayer.h +++ b/platform/darwin/src/MGLSymbolStyleLayer.h @@ -113,21 +113,21 @@ typedef NS_ENUM(NSUInteger, MGLTextAnchor) { /** Text justification options. - Values of this type are used in the `textJustify` property of `MGLSymbolStyleLayer`. + Values of this type are used in the `textJustification` property of `MGLSymbolStyleLayer`. */ -typedef NS_ENUM(NSUInteger, MGLTextJustify) { +typedef NS_ENUM(NSUInteger, MGLTextJustification) { /** The text is aligned to the left. */ - MGLTextJustifyLeft, + MGLTextJustificationLeft, /** The text is centered. */ - MGLTextJustifyCenter, + MGLTextJustificationCenter, /** The text is aligned to the right. */ - MGLTextJustifyRight, + MGLTextJustificationRight, }; /** @@ -238,8 +238,13 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value. This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-allow-overlap"><code>icon-allow-overlap</code></a> layout property in the Mapbox Style Specification. */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconAllowOverlap; +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconAllowsOverlap; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconAllowOverlap __attribute__((unavailable("Use iconAllowsOverlap instead."))); /** If true, other symbols can be visible even if they collide with the icon. @@ -247,8 +252,13 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value. This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-ignore-placement"><code>icon-ignore-placement</code></a> layout property in the Mapbox Style Specification. */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconIgnorePlacement; +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconIgnoresPlacement; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconIgnorePlacement __attribute__((unavailable("Use iconIgnoresPlacement instead."))); /** A string with {tokens} replaced, referencing the data property to pull from. @@ -257,14 +267,8 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { */ @property (nonatomic, null_resettable) MGLStyleValue<NSString *> *iconImageName; -/** - If true, the icon may be flipped to prevent it from being rendered upside-down. - - The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value. - - This property is only applied to the style if `iconImageName` is non-`nil`, and `iconRotationAlignment` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLIconRotationAlignmentMap`, and `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored. - */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconKeepUpright; + +@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *iconImage __attribute__((unavailable("Use iconImageName instead."))); /** Offset distance of icon from its anchor. @@ -282,7 +286,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { This property is only applied to the style if `iconImageName` is non-`nil`, and `textField` is non-`nil`. Otherwise, it is ignored. */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconOptional; +@property (nonatomic, null_resettable, getter=isIconOptional) MGLStyleValue<NSNumber *> *iconOptional; /** Size of the additional area around the icon bounding box used for detecting symbol collisions. @@ -303,8 +307,13 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value. This property is only applied to the style if `iconImageName` is non-`nil`. Otherwise, it is ignored. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-rotate"><code>icon-rotate</code></a> layout property in the Mapbox Style Specification. */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconRotate; +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconRotation; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconRotate __attribute__((unavailable("Use iconRotation instead."))); /** In combination with `symbolPlacement`, determines the rotation behavior of icons. @@ -326,6 +335,9 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { */ @property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconScale; + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconSize __attribute__((unavailable("Use iconScale instead."))); + /** Scales the icon to fit around the associated text. @@ -347,11 +359,76 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { @property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTextFitPadding; /** + If true, the icon may be flipped to prevent it from being rendered upside-down. + + The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value. + + This property is only applied to the style if `iconImageName` is non-`nil`, and `iconRotationAlignment` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLIconRotationAlignmentMap`, and `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-keep-upright"><code>icon-keep-upright</code></a> layout property in the Mapbox Style Specification. + */ +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *keepsIconUpright; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconKeepUpright __attribute__((unavailable("Use keepsIconUpright instead."))); + +/** + If true, the text may be flipped vertically to prevent it from being rendered upside-down. + + The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `YES`. Set this property to `nil` to reset it to the default value. + + This property is only applied to the style if `textField` is non-`nil`, and `textRotationAlignment` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextRotationAlignmentMap`, and `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-keep-upright"><code>text-keep-upright</code></a> layout property in the Mapbox Style Specification. + */ +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *keepsTextUpright; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textKeepUpright __attribute__((unavailable("Use keepsTextUpright instead."))); + +/** + Maximum angle change between adjacent characters. + + This property is measured in degrees. + + The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `45`. Set this property to `nil` to reset it to the default value. + + This property is only applied to the style if `textField` is non-`nil`, and `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-max-angle"><code>text-max-angle</code></a> layout property in the Mapbox Style Specification. + */ +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumTextAngle; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textMaxAngle __attribute__((unavailable("Use maximumTextAngle instead."))); + +/** + The maximum line width for text wrapping. + + This property is measured in ems. + + The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `10`. Set this property to `nil` to reset it to the default value. + + This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-max-width"><code>text-max-width</code></a> layout property in the Mapbox Style Specification. + */ +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumTextWidth; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textMaxWidth __attribute__((unavailable("Use maximumTextWidth instead."))); + +/** If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-symbol-avoid-edges"><code>symbol-avoid-edges</code></a> layout property in the Mapbox Style Specification. */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolAvoidEdges; +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolAvoidsEdges; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolAvoidEdges __attribute__((unavailable("Use symbolAvoidsEdges instead."))); /** Label placement relative to its geometry. @@ -377,8 +454,13 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value. This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-allow-overlap"><code>text-allow-overlap</code></a> layout property in the Mapbox Style Specification. */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textAllowOverlap; +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textAllowsOverlap; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textAllowOverlap __attribute__((unavailable("Use textAllowsOverlap instead."))); /** Part of the text placed closest to the anchor. @@ -411,26 +493,27 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `NO`. Set this property to `nil` to reset it to the default value. This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-ignore-placement"><code>text-ignore-placement</code></a> layout property in the Mapbox Style Specification. */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textIgnorePlacement; +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textIgnoresPlacement; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textIgnorePlacement __attribute__((unavailable("Use textIgnoresPlacement instead."))); /** Text justification options. - The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextJustifyCenter`. Set this property to `nil` to reset it to the default value. + The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextJustificationCenter`. Set this property to `nil` to reset it to the default value. This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored. - */ -@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textJustify; - -/** - If true, the text may be flipped vertically to prevent it from being rendered upside-down. - - The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing `YES`. Set this property to `nil` to reset it to the default value. - This property is only applied to the style if `textField` is non-`nil`, and `textRotationAlignment` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextRotationAlignmentMap`, and `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored. + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-justify"><code>text-justify</code></a> layout property in the Mapbox Style Specification. */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textKeepUpright; +@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textJustification; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textJustify __attribute__((unavailable("Use textJustification instead."))); /** Text tracking amount. @@ -455,28 +538,6 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { @property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textLineHeight; /** - Maximum angle change between adjacent characters. - - This property is measured in degrees. - - The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `45`. Set this property to `nil` to reset it to the default value. - - This property is only applied to the style if `textField` is non-`nil`, and `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored. - */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textMaxAngle; - -/** - The maximum line width for text wrapping. - - This property is measured in ems. - - The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `10`. Set this property to `nil` to reset it to the default value. - - This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored. - */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textMaxWidth; - -/** Offset distance of text from its anchor. This property is measured in ems. @@ -494,7 +555,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { This property is only applied to the style if `textField` is non-`nil`, and `iconImageName` is non-`nil`. Otherwise, it is ignored. */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textOptional; +@property (nonatomic, null_resettable, getter=isTextOptional) MGLStyleValue<NSNumber *> *textOptional; /** Size of the additional area around the text bounding box used for detecting symbol collisions. @@ -524,8 +585,13 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value. This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored. + + This attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-rotate"><code>text-rotate</code></a> layout property in the Mapbox Style Specification. */ -@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textRotate; +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textRotation; + + +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textRotate __attribute__((unavailable("Use textRotation instead."))); /** In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text. |