|
| 1 | +// This file is generated. |
| 2 | +// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`. |
| 3 | + |
| 4 | +#import "MGLFoundation.h" |
| 5 | +#import "MGLStyleValue.h" |
| 6 | +#import "MGLVectorStyleLayer.h" |
| 7 | + |
| 8 | +NS_ASSUME_NONNULL_BEGIN |
| 9 | + |
| 10 | +/** |
| 11 | + Direction of light source when map is rotated. |
| 12 | +
|
| 13 | + Values of this type are used in the `MGLHillshadeStyleLayer.hillshadeIlluminationAnchor` |
| 14 | + property. |
| 15 | + */ |
| 16 | +typedef NS_ENUM(NSUInteger, MGLHillshadeIlluminationAnchor) { |
| 17 | + /** |
| 18 | + The hillshade illumination is relative to the north direction. |
| 19 | + */ |
| 20 | + MGLHillshadeIlluminationAnchorMap, |
| 21 | + /** |
| 22 | + The hillshade illumination is relative to the top of the viewport. |
| 23 | + */ |
| 24 | + MGLHillshadeIlluminationAnchorViewport, |
| 25 | +}; |
| 26 | + |
| 27 | +/** |
| 28 | + Client-side hillshading visualization based on DEM data. Currently, the |
| 29 | + implementation only supports Mapbox Terrain RGB tiles |
| 30 | +
|
| 31 | + You can access an existing hillshade style layer using the |
| 32 | + `-[MGLStyle layerWithIdentifier:]` method if you know its identifier; |
| 33 | + otherwise, find it using the `MGLStyle.layers` property. You can also create a |
| 34 | + new hillshade style layer and add it to the style using a method such as |
| 35 | + `-[MGLStyle addLayer:]`. |
| 36 | +
|
| 37 | + ### Example |
| 38 | +
|
| 39 | + ```swift |
| 40 | + ``` |
| 41 | + */ |
| 42 | +MGL_EXPORT |
| 43 | +@interface MGLHillshadeStyleLayer : MGLVectorStyleLayer |
| 44 | + |
| 45 | +/** |
| 46 | + Returns a hillshade style layer initialized with an identifier and source. |
| 47 | +
|
| 48 | + After initializing and configuring the style layer, add it to a map view’s |
| 49 | + style using the `-[MGLStyle addLayer:]` or |
| 50 | + `-[MGLStyle insertLayer:belowLayer:]` method. |
| 51 | +
|
| 52 | + @param identifier A string that uniquely identifies the source in the style to |
| 53 | + which it is added. |
| 54 | + @param source The source from which to obtain the data to style. If the source |
| 55 | + has not yet been added to the current style, the behavior is undefined. |
| 56 | + @return An initialized foreground style layer. |
| 57 | + */ |
| 58 | +- (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source; |
| 59 | + |
| 60 | +#pragma mark - Accessing the Paint Attributes |
| 61 | + |
| 62 | +#if TARGET_OS_IPHONE |
| 63 | +/** |
| 64 | + The shading color used to accentuate rugged terrain like sharp cliffs and |
| 65 | + gorges. |
| 66 | + |
| 67 | + The default value of this property is an `MGLStyleValue` object containing |
| 68 | + `UIColor.blackColor`. Set this property to `nil` to reset it to the default |
| 69 | + value. |
| 70 | + |
| 71 | + You can set this property to an instance of: |
| 72 | + |
| 73 | + * `MGLConstantStyleValue` |
| 74 | + * `MGLCameraStyleFunction` with an interpolation mode of: |
| 75 | + * `MGLInterpolationModeExponential` |
| 76 | + * `MGLInterpolationModeInterval` |
| 77 | + */ |
| 78 | +@property (nonatomic, null_resettable) MGLStyleValue<UIColor *> *hillshadeAccentColor; |
| 79 | +#else |
| 80 | +/** |
| 81 | + The shading color used to accentuate rugged terrain like sharp cliffs and |
| 82 | + gorges. |
| 83 | + |
| 84 | + The default value of this property is an `MGLStyleValue` object containing |
| 85 | + `NSColor.blackColor`. Set this property to `nil` to reset it to the default |
| 86 | + value. |
| 87 | + |
| 88 | + You can set this property to an instance of: |
| 89 | + |
| 90 | + * `MGLConstantStyleValue` |
| 91 | + * `MGLCameraStyleFunction` with an interpolation mode of: |
| 92 | + * `MGLInterpolationModeExponential` |
| 93 | + * `MGLInterpolationModeInterval` |
| 94 | + */ |
| 95 | +@property (nonatomic, null_resettable) MGLStyleValue<NSColor *> *hillshadeAccentColor; |
| 96 | +#endif |
| 97 | + |
| 98 | +/** |
| 99 | + The transition affecting any changes to this layer’s `hillshadeAccentColor` property. |
| 100 | +
|
| 101 | + This property corresponds to the `hillshade-accent-color-transition` property in the style JSON file format. |
| 102 | +*/ |
| 103 | +@property (nonatomic) MGLTransition hillshadeAccentColorTransition; |
| 104 | + |
| 105 | +/** |
| 106 | + Intensity of the hillshade |
| 107 | + |
| 108 | + The default value of this property is an `MGLStyleValue` object containing an |
| 109 | + `NSNumber` object containing the float `0.5`. Set this property to `nil` to |
| 110 | + reset it to the default value. |
| 111 | + |
| 112 | + You can set this property to an instance of: |
| 113 | + |
| 114 | + * `MGLConstantStyleValue` |
| 115 | + * `MGLCameraStyleFunction` with an interpolation mode of: |
| 116 | + * `MGLInterpolationModeExponential` |
| 117 | + * `MGLInterpolationModeInterval` |
| 118 | + */ |
| 119 | +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *hillshadeExaggeration; |
| 120 | + |
| 121 | +/** |
| 122 | + The transition affecting any changes to this layer’s `hillshadeExaggeration` property. |
| 123 | +
|
| 124 | + This property corresponds to the `hillshade-exaggeration-transition` property in the style JSON file format. |
| 125 | +*/ |
| 126 | +@property (nonatomic) MGLTransition hillshadeExaggerationTransition; |
| 127 | + |
| 128 | +#if TARGET_OS_IPHONE |
| 129 | +/** |
| 130 | + The shading color of areas that faces towards the light source. |
| 131 | + |
| 132 | + The default value of this property is an `MGLStyleValue` object containing |
| 133 | + `UIColor.whiteColor`. Set this property to `nil` to reset it to the default |
| 134 | + value. |
| 135 | + |
| 136 | + You can set this property to an instance of: |
| 137 | + |
| 138 | + * `MGLConstantStyleValue` |
| 139 | + * `MGLCameraStyleFunction` with an interpolation mode of: |
| 140 | + * `MGLInterpolationModeExponential` |
| 141 | + * `MGLInterpolationModeInterval` |
| 142 | + */ |
| 143 | +@property (nonatomic, null_resettable) MGLStyleValue<UIColor *> *hillshadeHighlightColor; |
| 144 | +#else |
| 145 | +/** |
| 146 | + The shading color of areas that faces towards the light source. |
| 147 | + |
| 148 | + The default value of this property is an `MGLStyleValue` object containing |
| 149 | + `NSColor.whiteColor`. Set this property to `nil` to reset it to the default |
| 150 | + value. |
| 151 | + |
| 152 | + You can set this property to an instance of: |
| 153 | + |
| 154 | + * `MGLConstantStyleValue` |
| 155 | + * `MGLCameraStyleFunction` with an interpolation mode of: |
| 156 | + * `MGLInterpolationModeExponential` |
| 157 | + * `MGLInterpolationModeInterval` |
| 158 | + */ |
| 159 | +@property (nonatomic, null_resettable) MGLStyleValue<NSColor *> *hillshadeHighlightColor; |
| 160 | +#endif |
| 161 | + |
| 162 | +/** |
| 163 | + The transition affecting any changes to this layer’s `hillshadeHighlightColor` property. |
| 164 | +
|
| 165 | + This property corresponds to the `hillshade-highlight-color-transition` property in the style JSON file format. |
| 166 | +*/ |
| 167 | +@property (nonatomic) MGLTransition hillshadeHighlightColorTransition; |
| 168 | + |
| 169 | +/** |
| 170 | + Direction of light source when map is rotated. |
| 171 | + |
| 172 | + The default value of this property is an `MGLStyleValue` object containing an |
| 173 | + `NSValue` object containing `MGLHillshadeIlluminationAnchorViewport`. Set this |
| 174 | + property to `nil` to reset it to the default value. |
| 175 | + |
| 176 | + You can set this property to an instance of: |
| 177 | + |
| 178 | + * `MGLConstantStyleValue` |
| 179 | + * `MGLCameraStyleFunction` with an interpolation mode of |
| 180 | + `MGLInterpolationModeInterval` |
| 181 | + */ |
| 182 | +@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *hillshadeIlluminationAnchor; |
| 183 | + |
| 184 | +/** |
| 185 | + The direction of the light source used to generate the hillshading with 0 as |
| 186 | + the top of the viewport if `hillshadeIlluminationAnchor` is set to |
| 187 | + `MGLHillshadeIlluminationAnchorViewport` and due north if |
| 188 | + `hillshadeIlluminationAnchor` is set to `MGLHillshadeIlluminationAnchorMap`. |
| 189 | + |
| 190 | + The default value of this property is an `MGLStyleValue` object containing an |
| 191 | + `NSNumber` object containing the float `335`. Set this property to `nil` to |
| 192 | + reset it to the default value. |
| 193 | + |
| 194 | + You can set this property to an instance of: |
| 195 | + |
| 196 | + * `MGLConstantStyleValue` |
| 197 | + * `MGLCameraStyleFunction` with an interpolation mode of: |
| 198 | + * `MGLInterpolationModeExponential` |
| 199 | + * `MGLInterpolationModeInterval` |
| 200 | + */ |
| 201 | +@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *hillshadeIlluminationDirection; |
| 202 | + |
| 203 | +/** |
| 204 | + The transition affecting any changes to this layer’s `hillshadeIlluminationDirection` property. |
| 205 | +
|
| 206 | + This property corresponds to the `hillshade-illumination-direction-transition` property in the style JSON file format. |
| 207 | +*/ |
| 208 | +@property (nonatomic) MGLTransition hillshadeIlluminationDirectionTransition; |
| 209 | + |
| 210 | +#if TARGET_OS_IPHONE |
| 211 | +/** |
| 212 | + The shading color of areas that face away from the light source. |
| 213 | + |
| 214 | + The default value of this property is an `MGLStyleValue` object containing |
| 215 | + `UIColor.blackColor`. Set this property to `nil` to reset it to the default |
| 216 | + value. |
| 217 | + |
| 218 | + You can set this property to an instance of: |
| 219 | + |
| 220 | + * `MGLConstantStyleValue` |
| 221 | + * `MGLCameraStyleFunction` with an interpolation mode of: |
| 222 | + * `MGLInterpolationModeExponential` |
| 223 | + * `MGLInterpolationModeInterval` |
| 224 | + */ |
| 225 | +@property (nonatomic, null_resettable) MGLStyleValue<UIColor *> *hillshadeShadowColor; |
| 226 | +#else |
| 227 | +/** |
| 228 | + The shading color of areas that face away from the light source. |
| 229 | + |
| 230 | + The default value of this property is an `MGLStyleValue` object containing |
| 231 | + `NSColor.blackColor`. Set this property to `nil` to reset it to the default |
| 232 | + value. |
| 233 | + |
| 234 | + You can set this property to an instance of: |
| 235 | + |
| 236 | + * `MGLConstantStyleValue` |
| 237 | + * `MGLCameraStyleFunction` with an interpolation mode of: |
| 238 | + * `MGLInterpolationModeExponential` |
| 239 | + * `MGLInterpolationModeInterval` |
| 240 | + */ |
| 241 | +@property (nonatomic, null_resettable) MGLStyleValue<NSColor *> *hillshadeShadowColor; |
| 242 | +#endif |
| 243 | + |
| 244 | +/** |
| 245 | + The transition affecting any changes to this layer’s `hillshadeShadowColor` property. |
| 246 | +
|
| 247 | + This property corresponds to the `hillshade-shadow-color-transition` property in the style JSON file format. |
| 248 | +*/ |
| 249 | +@property (nonatomic) MGLTransition hillshadeShadowColorTransition; |
| 250 | + |
| 251 | +@end |
| 252 | + |
| 253 | +/** |
| 254 | + Methods for wrapping an enumeration value for a style layer attribute in an |
| 255 | + `MGLHillshadeStyleLayer` object and unwrapping its raw value. |
| 256 | + */ |
| 257 | +@interface NSValue (MGLHillshadeStyleLayerAdditions) |
| 258 | + |
| 259 | +#pragma mark Working with Hillshade Style Layer Attribute Values |
| 260 | + |
| 261 | +/** |
| 262 | + Creates a new value object containing the given `MGLHillshadeIlluminationAnchor` enumeration. |
| 263 | +
|
| 264 | + @param hillshadeIlluminationAnchor The value for the new object. |
| 265 | + @return A new value object that contains the enumeration value. |
| 266 | + */ |
| 267 | ++ (instancetype)valueWithMGLHillshadeIlluminationAnchor:(MGLHillshadeIlluminationAnchor)hillshadeIlluminationAnchor; |
| 268 | + |
| 269 | +/** |
| 270 | + The `MGLHillshadeIlluminationAnchor` enumeration representation of the value. |
| 271 | + */ |
| 272 | +@property (readonly) MGLHillshadeIlluminationAnchor MGLHillshadeIlluminationAnchorValue; |
| 273 | + |
| 274 | +@end |
| 275 | + |
| 276 | +NS_ASSUME_NONNULL_END |
0 commit comments