summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorFredrik Karlsson <bjorn.fredrik.karlsson@gmail.com>2016-11-21 14:32:05 +0100
committerFredrik Karlsson <bjorn.fredrik.karlsson@gmail.com>2016-11-30 11:36:39 +0100
commit17db5210bf60171ee7dbc15de77fdea53b8f0d4d (patch)
treeed45be8b0aef1592dc5fc3e7f8bf03d2d62e6dbd /platform/darwin
parent4096544188501c8e6e9220847fff910eb153d42b (diff)
downloadqtlocation-mapboxgl-17db5210bf60171ee7dbc15de77fdea53b8f0d4d.tar.gz
[ios, macos] rename style spec properties
Diffstat (limited to 'platform/darwin')
-rw-r--r--platform/darwin/scripts/generate-style-code.js21
-rw-r--r--platform/darwin/scripts/style-spec-cocoa-conventions-v8.json9
-rw-r--r--platform/darwin/src/MGLBackgroundStyleLayer.h10
-rw-r--r--platform/darwin/src/MGLBackgroundStyleLayer.mm20
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.h64
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.mm60
-rw-r--r--platform/darwin/src/MGLFillStyleLayer.h24
-rw-r--r--platform/darwin/src/MGLFillStyleLayer.mm40
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.h70
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.mm92
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer.h42
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer.mm70
-rw-r--r--platform/darwin/src/MGLStyleLayer.mm.ejs28
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer.h402
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer.mm412
-rw-r--r--platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.h66
-rw-r--r--platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.mm60
-rw-r--r--platform/darwin/test/MGLBackgroundStyleLayerTests.m8
-rw-r--r--platform/darwin/test/MGLCircleStyleLayerTests.m26
-rw-r--r--platform/darwin/test/MGLFillStyleLayerTests.m16
-rw-r--r--platform/darwin/test/MGLLineStyleLayerTests.m48
-rw-r--r--platform/darwin/test/MGLRasterStyleLayerTests.m40
-rw-r--r--platform/darwin/test/MGLSymbolStyleLayerTests.m208
23 files changed, 929 insertions, 907 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index 9090bb40e6..b5689dca3a 100644
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -4,11 +4,20 @@ const fs = require('fs');
const ejs = require('ejs');
const _ = require('lodash');
const colorParser = require('csscolorparser');
-const spec = _.merge(require('mapbox-gl-style-spec').latest, require('./style-spec-overrides-v8.json'));
-
+const cocoaConventions = require('./style-spec-cocoa-conventions-v8.json');
+let spec = _.merge(require('mapbox-gl-style-spec').latest, require('./style-spec-overrides-v8.json'));
const prefix = 'MGL';
const suffix = 'StyleLayer';
+// Rename properties and keep `original` for use with setters and getters
+_.forOwn(cocoaConventions, function (properties, kind) {
+ _.forOwn(properties, function (newName, oldName) {
+ spec[kind][newName] = spec[kind][oldName];
+ spec[kind][newName].original = oldName;
+ delete spec[kind][oldName];
+ })
+});
+
global.camelize = function (str) {
return str.replace(/(?:^|-)(.)/g, function (_, x) {
return x.toUpperCase();
@@ -212,6 +221,10 @@ global.propertyDefault = function (property, layerType) {
return 'an `MGLStyleValue` object containing ' + describeValue(property.default, property, layerType);
};
+global.originalPropertyName = function (property) {
+ return property.original || property.name;
+}
+
global.propertyType = function (property) {
switch (property.type) {
case 'boolean':
@@ -321,8 +334,8 @@ const layers = Object.keys(spec.layer.type.values).map((type) => {
return {
type: type,
- layoutProperties: layoutProperties,
- paintProperties: paintProperties,
+ layoutProperties: _.sortBy(layoutProperties, ['name']),
+ paintProperties: _.sortBy(paintProperties, ['name']),
layoutPropertiesByName: spec[`layout_${type}`],
paintPropertiesByName: spec[`paint_${type}`],
};
diff --git a/platform/darwin/scripts/style-spec-cocoa-conventions-v8.json b/platform/darwin/scripts/style-spec-cocoa-conventions-v8.json
new file mode 100644
index 0000000000..e37598406b
--- /dev/null
+++ b/platform/darwin/scripts/style-spec-cocoa-conventions-v8.json
@@ -0,0 +1,9 @@
+{
+ "layout_symbol": {
+ "icon-image": "icon-image-name"
+ },
+ "paint_raster": {
+ "raster-brightness-min": "minimum-raster-brightness",
+ "raster-brightness-max": "maximum-raster-brightness"
+ }
+} \ No newline at end of file
diff --git a/platform/darwin/src/MGLBackgroundStyleLayer.h b/platform/darwin/src/MGLBackgroundStyleLayer.h
index a70383cc9c..656e104bbb 100644
--- a/platform/darwin/src/MGLBackgroundStyleLayer.h
+++ b/platform/darwin/src/MGLBackgroundStyleLayer.h
@@ -39,17 +39,17 @@ NS_ASSUME_NONNULL_BEGIN
#endif
/**
- Name of image in style images to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).
- */
-@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *backgroundPattern;
-
-/**
The opacity at which the background will be drawn.
The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *backgroundOpacity;
+/**
+ Name of image in style images to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).
+ */
+@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *backgroundPattern;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/platform/darwin/src/MGLBackgroundStyleLayer.mm b/platform/darwin/src/MGLBackgroundStyleLayer.mm
index 6e30a20c97..59aa06910e 100644
--- a/platform/darwin/src/MGLBackgroundStyleLayer.mm
+++ b/platform/darwin/src/MGLBackgroundStyleLayer.mm
@@ -70,16 +70,6 @@
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
-- (void)setBackgroundPattern:(MGLStyleValue<NSString *> *)backgroundPattern {
- auto mbglValue = MGLStyleValueTransformer<std::string, NSString *>().toPropertyValue(backgroundPattern);
- _rawLayer->setBackgroundPattern(mbglValue);
-}
-
-- (MGLStyleValue<NSString *> *)backgroundPattern {
- auto propertyValue = _rawLayer->getBackgroundPattern() ?: _rawLayer->getDefaultBackgroundPattern();
- return MGLStyleValueTransformer<std::string, NSString *>().toStyleValue(propertyValue);
-}
-
- (void)setBackgroundOpacity:(MGLStyleValue<NSNumber *> *)backgroundOpacity {
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(backgroundOpacity);
_rawLayer->setBackgroundOpacity(mbglValue);
@@ -90,5 +80,15 @@
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
+- (void)setBackgroundPattern:(MGLStyleValue<NSString *> *)backgroundPattern {
+ auto mbglValue = MGLStyleValueTransformer<std::string, NSString *>().toPropertyValue(backgroundPattern);
+ _rawLayer->setBackgroundPattern(mbglValue);
+}
+
+- (MGLStyleValue<NSString *> *)backgroundPattern {
+ auto propertyValue = _rawLayer->getBackgroundPattern() ?: _rawLayer->getDefaultBackgroundPattern();
+ return MGLStyleValueTransformer<std::string, NSString *>().toStyleValue(propertyValue);
+}
+
@end
diff --git a/platform/darwin/src/MGLCircleStyleLayer.h b/platform/darwin/src/MGLCircleStyleLayer.h
index da7076e7d1..2d88a664ba 100644
--- a/platform/darwin/src/MGLCircleStyleLayer.h
+++ b/platform/darwin/src/MGLCircleStyleLayer.h
@@ -7,35 +7,35 @@
NS_ASSUME_NONNULL_BEGIN
/**
- Controls the translation reference point.
+ Controls the scaling behavior of the circle when the map is pitched.
- Values of this type are used in the `circleTranslateAnchor` property of `MGLCircleStyleLayer`.
+ Values of this type are used in the `circlePitchScale` property of `MGLCircleStyleLayer`.
*/
-typedef NS_ENUM(NSUInteger, MGLCircleTranslateAnchor) {
+typedef NS_ENUM(NSUInteger, MGLCirclePitchScale) {
/**
- The circle is translated relative to the map.
+ Circles are scaled according to their apparent distance to the camera.
*/
- MGLCircleTranslateAnchorMap,
+ MGLCirclePitchScaleMap,
/**
- The circle is translated relative to the viewport.
+ Circles are not scaled.
*/
- MGLCircleTranslateAnchorViewport,
+ MGLCirclePitchScaleViewport,
};
/**
- Controls the scaling behavior of the circle when the map is pitched.
+ Controls the translation reference point.
- Values of this type are used in the `circlePitchScale` property of `MGLCircleStyleLayer`.
+ Values of this type are used in the `circleTranslateAnchor` property of `MGLCircleStyleLayer`.
*/
-typedef NS_ENUM(NSUInteger, MGLCirclePitchScale) {
+typedef NS_ENUM(NSUInteger, MGLCircleTranslateAnchor) {
/**
- Circles are scaled according to their apparent distance to the camera.
+ The circle is translated relative to the map.
*/
- MGLCirclePitchScaleMap,
+ MGLCircleTranslateAnchorMap,
/**
- Circles are not scaled.
+ The circle is translated relative to the viewport.
*/
- MGLCirclePitchScaleViewport,
+ MGLCircleTranslateAnchorViewport,
};
/**
@@ -49,13 +49,11 @@ typedef NS_ENUM(NSUInteger, MGLCirclePitchScale) {
#pragma mark - Accessing the Paint Attributes
/**
- Circle radius.
-
- This property is measured in points.
+ Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `5`. Set this property to `nil` to reset it to the default value.
+ 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.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *circleRadius;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *circleBlur;
#if TARGET_OS_IPHONE
/**
@@ -74,18 +72,27 @@ typedef NS_ENUM(NSUInteger, MGLCirclePitchScale) {
#endif
/**
- Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.
+ The opacity at which the circle will be drawn.
- 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.
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *circleBlur;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *circleOpacity;
/**
- The opacity at which the circle will be drawn.
+ Controls the scaling behavior of the circle when the map is pitched.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. 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 `MGLCirclePitchScaleMap`. Set this property to `nil` to reset it to the default value.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *circleOpacity;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circlePitchScale;
+
+/**
+ Circle radius.
+
+ This property is measured in points.
+
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `5`. Set this property to `nil` to reset it to the default value.
+ */
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *circleRadius;
/**
The geometry's offset.
@@ -105,13 +112,6 @@ typedef NS_ENUM(NSUInteger, MGLCirclePitchScale) {
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslateAnchor;
-/**
- Controls the scaling behavior of the circle when the map is pitched.
-
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLCirclePitchScaleMap`. Set this property to `nil` to reset it to the default value.
- */
-@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circlePitchScale;
-
@end
NS_ASSUME_NONNULL_END
diff --git a/platform/darwin/src/MGLCircleStyleLayer.mm b/platform/darwin/src/MGLCircleStyleLayer.mm
index aca8ff028c..1c903ab008 100644
--- a/platform/darwin/src/MGLCircleStyleLayer.mm
+++ b/platform/darwin/src/MGLCircleStyleLayer.mm
@@ -11,16 +11,16 @@
#include <mbgl/style/layers/circle_layer.hpp>
namespace mbgl {
- MBGL_DEFINE_ENUM(MGLCircleTranslateAnchor, {
- { MGLCircleTranslateAnchorMap, "map" },
- { MGLCircleTranslateAnchorViewport, "viewport" },
- });
-
MBGL_DEFINE_ENUM(MGLCirclePitchScale, {
{ MGLCirclePitchScaleMap, "map" },
{ MGLCirclePitchScaleViewport, "viewport" },
});
+ MBGL_DEFINE_ENUM(MGLCircleTranslateAnchor, {
+ { MGLCircleTranslateAnchorMap, "map" },
+ { MGLCircleTranslateAnchorViewport, "viewport" },
+ });
+
}
@interface MGLCircleStyleLayer ()
@@ -92,13 +92,13 @@ namespace mbgl {
#pragma mark - Accessing the Paint Attributes
-- (void)setCircleRadius:(MGLStyleValue<NSNumber *> *)circleRadius {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(circleRadius);
- _rawLayer->setCircleRadius(mbglValue);
+- (void)setCircleBlur:(MGLStyleValue<NSNumber *> *)circleBlur {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(circleBlur);
+ _rawLayer->setCircleBlur(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)circleRadius {
- auto propertyValue = _rawLayer->getCircleRadius() ?: _rawLayer->getDefaultCircleRadius();
+- (MGLStyleValue<NSNumber *> *)circleBlur {
+ auto propertyValue = _rawLayer->getCircleBlur() ?: _rawLayer->getDefaultCircleBlur();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -112,16 +112,6 @@ namespace mbgl {
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
-- (void)setCircleBlur:(MGLStyleValue<NSNumber *> *)circleBlur {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(circleBlur);
- _rawLayer->setCircleBlur(mbglValue);
-}
-
-- (MGLStyleValue<NSNumber *> *)circleBlur {
- auto propertyValue = _rawLayer->getCircleBlur() ?: _rawLayer->getDefaultCircleBlur();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
-}
-
- (void)setCircleOpacity:(MGLStyleValue<NSNumber *> *)circleOpacity {
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(circleOpacity);
_rawLayer->setCircleOpacity(mbglValue);
@@ -132,6 +122,26 @@ namespace mbgl {
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
+- (void)setCirclePitchScale:(MGLStyleValue<NSValue *> *)circlePitchScale {
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::CirclePitchScaleType, NSValue *, mbgl::style::CirclePitchScaleType, MGLCirclePitchScale>().toEnumPropertyValue(circlePitchScale);
+ _rawLayer->setCirclePitchScale(mbglValue);
+}
+
+- (MGLStyleValue<NSValue *> *)circlePitchScale {
+ auto propertyValue = _rawLayer->getCirclePitchScale() ?: _rawLayer->getDefaultCirclePitchScale();
+ return MGLStyleValueTransformer<mbgl::style::CirclePitchScaleType, NSValue *, mbgl::style::CirclePitchScaleType, MGLCirclePitchScale>().toEnumStyleValue(propertyValue);
+}
+
+- (void)setCircleRadius:(MGLStyleValue<NSNumber *> *)circleRadius {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(circleRadius);
+ _rawLayer->setCircleRadius(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)circleRadius {
+ auto propertyValue = _rawLayer->getCircleRadius() ?: _rawLayer->getDefaultCircleRadius();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
- (void)setCircleTranslate:(MGLStyleValue<NSValue *> *)circleTranslate {
auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(circleTranslate);
_rawLayer->setCircleTranslate(mbglValue);
@@ -152,15 +162,5 @@ namespace mbgl {
return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLCircleTranslateAnchor>().toEnumStyleValue(propertyValue);
}
-- (void)setCirclePitchScale:(MGLStyleValue<NSValue *> *)circlePitchScale {
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::CirclePitchScaleType, NSValue *, mbgl::style::CirclePitchScaleType, MGLCirclePitchScale>().toEnumPropertyValue(circlePitchScale);
- _rawLayer->setCirclePitchScale(mbglValue);
-}
-
-- (MGLStyleValue<NSValue *> *)circlePitchScale {
- auto propertyValue = _rawLayer->getCirclePitchScale() ?: _rawLayer->getDefaultCirclePitchScale();
- return MGLStyleValueTransformer<mbgl::style::CirclePitchScaleType, NSValue *, mbgl::style::CirclePitchScaleType, MGLCirclePitchScale>().toEnumStyleValue(propertyValue);
-}
-
@end
diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h
index 799fa380c0..9bbda26ce4 100644
--- a/platform/darwin/src/MGLFillStyleLayer.h
+++ b/platform/darwin/src/MGLFillStyleLayer.h
@@ -39,13 +39,6 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslateAnchor) {
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *fillAntialias;
-/**
- The opacity of the entire fill layer. In contrast to the `fillColor`, this value will also affect the 1pt stroke around the fill, if the stroke is used.
-
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
- */
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *fillOpacity;
-
#if TARGET_OS_IPHONE
/**
The color of the filled part of this layer.
@@ -67,6 +60,13 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslateAnchor) {
#endif
/**
+ The opacity of the entire fill layer. In contrast to the `fillColor`, this value will also affect the 1pt stroke around the fill, if the stroke is used.
+
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ */
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *fillOpacity;
+
+/**
The outline color of the fill. Matches the value of `fillColor` if unspecified.
This property is only applied to the style if `fillPattern` is set to `nil`, and `fillAntialias` is set to an `MGLStyleValue` object containing an `NSNumber` object containing `YES`. Otherwise, it is ignored.
@@ -74,6 +74,11 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *fillOutlineColor;
/**
+ Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).
+ */
+@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *fillPattern;
+
+/**
The geometry's offset.
This property is measured in points.
@@ -91,11 +96,6 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslateAnchor) {
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslateAnchor;
-/**
- Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).
- */
-@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *fillPattern;
-
@end
NS_ASSUME_NONNULL_END
diff --git a/platform/darwin/src/MGLFillStyleLayer.mm b/platform/darwin/src/MGLFillStyleLayer.mm
index d670fd31e9..6f9c68f21f 100644
--- a/platform/darwin/src/MGLFillStyleLayer.mm
+++ b/platform/darwin/src/MGLFillStyleLayer.mm
@@ -97,16 +97,6 @@ namespace mbgl {
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setFillOpacity:(MGLStyleValue<NSNumber *> *)fillOpacity {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(fillOpacity);
- _rawLayer->setFillOpacity(mbglValue);
-}
-
-- (MGLStyleValue<NSNumber *> *)fillOpacity {
- auto propertyValue = _rawLayer->getFillOpacity() ?: _rawLayer->getDefaultFillOpacity();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
-}
-
- (void)setFillColor:(MGLStyleValue<MGLColor *> *)fillColor {
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(fillColor);
_rawLayer->setFillColor(mbglValue);
@@ -117,6 +107,16 @@ namespace mbgl {
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
+- (void)setFillOpacity:(MGLStyleValue<NSNumber *> *)fillOpacity {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(fillOpacity);
+ _rawLayer->setFillOpacity(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)fillOpacity {
+ auto propertyValue = _rawLayer->getFillOpacity() ?: _rawLayer->getDefaultFillOpacity();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
- (void)setFillOutlineColor:(MGLStyleValue<MGLColor *> *)fillOutlineColor {
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(fillOutlineColor);
_rawLayer->setFillOutlineColor(mbglValue);
@@ -127,6 +127,16 @@ namespace mbgl {
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
+- (void)setFillPattern:(MGLStyleValue<NSString *> *)fillPattern {
+ auto mbglValue = MGLStyleValueTransformer<std::string, NSString *>().toPropertyValue(fillPattern);
+ _rawLayer->setFillPattern(mbglValue);
+}
+
+- (MGLStyleValue<NSString *> *)fillPattern {
+ auto propertyValue = _rawLayer->getFillPattern() ?: _rawLayer->getDefaultFillPattern();
+ return MGLStyleValueTransformer<std::string, NSString *>().toStyleValue(propertyValue);
+}
+
- (void)setFillTranslate:(MGLStyleValue<NSValue *> *)fillTranslate {
auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(fillTranslate);
_rawLayer->setFillTranslate(mbglValue);
@@ -147,15 +157,5 @@ namespace mbgl {
return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLFillTranslateAnchor>().toEnumStyleValue(propertyValue);
}
-- (void)setFillPattern:(MGLStyleValue<NSString *> *)fillPattern {
- auto mbglValue = MGLStyleValueTransformer<std::string, NSString *>().toPropertyValue(fillPattern);
- _rawLayer->setFillPattern(mbglValue);
-}
-
-- (MGLStyleValue<NSString *> *)fillPattern {
- auto propertyValue = _rawLayer->getFillPattern() ?: _rawLayer->getDefaultFillPattern();
- return MGLStyleValueTransformer<std::string, NSString *>().toStyleValue(propertyValue);
-}
-
@end
diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h
index 68b0a73a2e..74d8f7bfe9 100644
--- a/platform/darwin/src/MGLLineStyleLayer.h
+++ b/platform/darwin/src/MGLLineStyleLayer.h
@@ -107,11 +107,13 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) {
#pragma mark - Accessing the Paint Attributes
/**
- The opacity at which the line will be drawn.
+ Blur applied to the line, in points.
+
+ This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ 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.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineOpacity;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineBlur;
#if TARGET_OS_IPHONE
/**
@@ -134,31 +136,13 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) {
#endif
/**
- The geometry's offset.
-
- This property is measured in points.
-
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 points from the left and 0 points from the top. Set this property to `nil` to reset it to the default value.
- */
-@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslate;
-
-/**
- Controls the translation reference point.
-
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLLineTranslateAnchorMap`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `lineTranslate` is non-`nil`. Otherwise, it is ignored.
- */
-@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslateAnchor;
+ Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to points, multiply the length by the current line width.
-/**
- Stroke thickness.
+ This property is measured in line widths.
- This property is measured in points.
-
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ This property is only applied to the style if `linePattern` is set to `nil`. Otherwise, it is ignored.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineWidth;
+@property (nonatomic, null_resettable) MGLStyleValue<NSArray<NSNumber *> *> *lineDasharray;
/**
Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
@@ -179,27 +163,43 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineOffset;
/**
- Blur applied to the line, in points.
+ The opacity at which the line will be drawn.
+
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ */
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineOpacity;
+
+/**
+ Name of image in style images to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).
+ */
+@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *linePattern;
+
+/**
+ The geometry's offset.
This property is measured in points.
- 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.
+ The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 points from the left and 0 points from the top. Set this property to `nil` to reset it to the default value.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineBlur;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslate;
/**
- Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to points, multiply the length by the current line width.
-
- This property is measured in line widths.
+ Controls the translation reference point.
+
+ The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLLineTranslateAnchorMap`. Set this property to `nil` to reset it to the default value.
- This property is only applied to the style if `linePattern` is set to `nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `lineTranslate` is non-`nil`. Otherwise, it is ignored.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSArray<NSNumber *> *> *lineDasharray;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslateAnchor;
/**
- Name of image in style images to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).
+ Stroke thickness.
+
+ This property is measured in points.
+
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *linePattern;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *lineWidth;
@end
diff --git a/platform/darwin/src/MGLLineStyleLayer.mm b/platform/darwin/src/MGLLineStyleLayer.mm
index 34c58aa49a..c37d1b6590 100644
--- a/platform/darwin/src/MGLLineStyleLayer.mm
+++ b/platform/darwin/src/MGLLineStyleLayer.mm
@@ -141,13 +141,13 @@ namespace mbgl {
#pragma mark - Accessing the Paint Attributes
-- (void)setLineOpacity:(MGLStyleValue<NSNumber *> *)lineOpacity {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(lineOpacity);
- _rawLayer->setLineOpacity(mbglValue);
+- (void)setLineBlur:(MGLStyleValue<NSNumber *> *)lineBlur {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(lineBlur);
+ _rawLayer->setLineBlur(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)lineOpacity {
- auto propertyValue = _rawLayer->getLineOpacity() ?: _rawLayer->getDefaultLineOpacity();
+- (MGLStyleValue<NSNumber *> *)lineBlur {
+ auto propertyValue = _rawLayer->getLineBlur() ?: _rawLayer->getDefaultLineBlur();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -161,34 +161,14 @@ namespace mbgl {
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
-- (void)setLineTranslate:(MGLStyleValue<NSValue *> *)lineTranslate {
- auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(lineTranslate);
- _rawLayer->setLineTranslate(mbglValue);
-}
-
-- (MGLStyleValue<NSValue *> *)lineTranslate {
- auto propertyValue = _rawLayer->getLineTranslate() ?: _rawLayer->getDefaultLineTranslate();
- return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
-}
-
-- (void)setLineTranslateAnchor:(MGLStyleValue<NSValue *> *)lineTranslateAnchor {
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLLineTranslateAnchor>().toEnumPropertyValue(lineTranslateAnchor);
- _rawLayer->setLineTranslateAnchor(mbglValue);
-}
-
-- (MGLStyleValue<NSValue *> *)lineTranslateAnchor {
- auto propertyValue = _rawLayer->getLineTranslateAnchor() ?: _rawLayer->getDefaultLineTranslateAnchor();
- return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLLineTranslateAnchor>().toEnumStyleValue(propertyValue);
-}
-
-- (void)setLineWidth:(MGLStyleValue<NSNumber *> *)lineWidth {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(lineWidth);
- _rawLayer->setLineWidth(mbglValue);
+- (void)setLineDasharray:(MGLStyleValue<NSArray<NSNumber *> *> *)lineDasharray {
+ auto mbglValue = MGLStyleValueTransformer<std::vector<float>, NSArray<NSNumber *> *, float>().toPropertyValue(lineDasharray);
+ _rawLayer->setLineDasharray(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)lineWidth {
- auto propertyValue = _rawLayer->getLineWidth() ?: _rawLayer->getDefaultLineWidth();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSArray<NSNumber *> *> *)lineDasharray {
+ auto propertyValue = _rawLayer->getLineDasharray() ?: _rawLayer->getDefaultLineDasharray();
+ return MGLStyleValueTransformer<std::vector<float>, NSArray<NSNumber *> *, float>().toStyleValue(propertyValue);
}
- (void)setLineGapWidth:(MGLStyleValue<NSNumber *> *)lineGapWidth {
@@ -211,26 +191,16 @@ namespace mbgl {
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setLineBlur:(MGLStyleValue<NSNumber *> *)lineBlur {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(lineBlur);
- _rawLayer->setLineBlur(mbglValue);
+- (void)setLineOpacity:(MGLStyleValue<NSNumber *> *)lineOpacity {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(lineOpacity);
+ _rawLayer->setLineOpacity(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)lineBlur {
- auto propertyValue = _rawLayer->getLineBlur() ?: _rawLayer->getDefaultLineBlur();
+- (MGLStyleValue<NSNumber *> *)lineOpacity {
+ auto propertyValue = _rawLayer->getLineOpacity() ?: _rawLayer->getDefaultLineOpacity();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setLineDasharray:(MGLStyleValue<NSArray<NSNumber *> *> *)lineDasharray {
- auto mbglValue = MGLStyleValueTransformer<std::vector<float>, NSArray<NSNumber *> *, float>().toPropertyValue(lineDasharray);
- _rawLayer->setLineDasharray(mbglValue);
-}
-
-- (MGLStyleValue<NSArray<NSNumber *> *> *)lineDasharray {
- auto propertyValue = _rawLayer->getLineDasharray() ?: _rawLayer->getDefaultLineDasharray();
- return MGLStyleValueTransformer<std::vector<float>, NSArray<NSNumber *> *, float>().toStyleValue(propertyValue);
-}
-
- (void)setLinePattern:(MGLStyleValue<NSString *> *)linePattern {
auto mbglValue = MGLStyleValueTransformer<std::string, NSString *>().toPropertyValue(linePattern);
_rawLayer->setLinePattern(mbglValue);
@@ -241,5 +211,35 @@ namespace mbgl {
return MGLStyleValueTransformer<std::string, NSString *>().toStyleValue(propertyValue);
}
+- (void)setLineTranslate:(MGLStyleValue<NSValue *> *)lineTranslate {
+ auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(lineTranslate);
+ _rawLayer->setLineTranslate(mbglValue);
+}
+
+- (MGLStyleValue<NSValue *> *)lineTranslate {
+ auto propertyValue = _rawLayer->getLineTranslate() ?: _rawLayer->getDefaultLineTranslate();
+ return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
+}
+
+- (void)setLineTranslateAnchor:(MGLStyleValue<NSValue *> *)lineTranslateAnchor {
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLLineTranslateAnchor>().toEnumPropertyValue(lineTranslateAnchor);
+ _rawLayer->setLineTranslateAnchor(mbglValue);
+}
+
+- (MGLStyleValue<NSValue *> *)lineTranslateAnchor {
+ auto propertyValue = _rawLayer->getLineTranslateAnchor() ?: _rawLayer->getDefaultLineTranslateAnchor();
+ return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLLineTranslateAnchor>().toEnumStyleValue(propertyValue);
+}
+
+- (void)setLineWidth:(MGLStyleValue<NSNumber *> *)lineWidth {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(lineWidth);
+ _rawLayer->setLineWidth(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)lineWidth {
+ auto propertyValue = _rawLayer->getLineWidth() ?: _rawLayer->getDefaultLineWidth();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
@end
diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h
index afae85001e..68b187a908 100644
--- a/platform/darwin/src/MGLRasterStyleLayer.h
+++ b/platform/darwin/src/MGLRasterStyleLayer.h
@@ -17,57 +17,57 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Accessing the Paint Attributes
/**
- The opacity at which the image will be drawn.
+ Increase or reduce the brightness of the image. The value is the maximum brightness.
The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterOpacity;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumRasterBrightness;
/**
- Rotates hues around the color wheel.
-
- This property is measured in degrees.
+ Increase or reduce the brightness of the image. The value is the minimum brightness.
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.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterHueRotate;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *minimumRasterBrightness;
/**
- Increase or reduce the brightness of the image. The value is the minimum brightness.
+ Increase or reduce the contrast of the image.
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.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterBrightnessMin;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterContrast;
/**
- Increase or reduce the brightness of the image. The value is the maximum brightness.
+ Fade duration when a new tile is added.
+
+ This property is measured in milliseconds.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `300`. Set this property to `nil` to reset it to the default value.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterBrightnessMax;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterFadeDuration;
/**
- Increase or reduce the saturation of the image.
+ Rotates hues around the color wheel.
+
+ This property is measured in degrees.
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.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterSaturation;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterHueRotate;
/**
- Increase or reduce the contrast of the image.
+ The opacity at which the image will be drawn.
- 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.
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterContrast;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterOpacity;
/**
- Fade duration when a new tile is added.
-
- This property is measured in milliseconds.
+ Increase or reduce the saturation of the image.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `300`. Set this property to `nil` to reset it to the default value.
+ 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.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterFadeDuration;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterSaturation;
@end
diff --git a/platform/darwin/src/MGLRasterStyleLayer.mm b/platform/darwin/src/MGLRasterStyleLayer.mm
index 49dc261be8..cd1d135ff2 100644
--- a/platform/darwin/src/MGLRasterStyleLayer.mm
+++ b/platform/darwin/src/MGLRasterStyleLayer.mm
@@ -59,73 +59,73 @@
#pragma mark - Accessing the Paint Attributes
-- (void)setRasterOpacity:(MGLStyleValue<NSNumber *> *)rasterOpacity {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterOpacity);
- _rawLayer->setRasterOpacity(mbglValue);
+- (void)setMaximumRasterBrightness:(MGLStyleValue<NSNumber *> *)maximumRasterBrightness {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(maximumRasterBrightness);
+ _rawLayer->setRasterBrightnessMax(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)rasterOpacity {
- auto propertyValue = _rawLayer->getRasterOpacity() ?: _rawLayer->getDefaultRasterOpacity();
+- (MGLStyleValue<NSNumber *> *)maximumRasterBrightness {
+ auto propertyValue = _rawLayer->getRasterBrightnessMax() ?: _rawLayer->getDefaultRasterBrightnessMax();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setRasterHueRotate:(MGLStyleValue<NSNumber *> *)rasterHueRotate {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterHueRotate);
- _rawLayer->setRasterHueRotate(mbglValue);
+- (void)setMinimumRasterBrightness:(MGLStyleValue<NSNumber *> *)minimumRasterBrightness {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(minimumRasterBrightness);
+ _rawLayer->setRasterBrightnessMin(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)rasterHueRotate {
- auto propertyValue = _rawLayer->getRasterHueRotate() ?: _rawLayer->getDefaultRasterHueRotate();
+- (MGLStyleValue<NSNumber *> *)minimumRasterBrightness {
+ auto propertyValue = _rawLayer->getRasterBrightnessMin() ?: _rawLayer->getDefaultRasterBrightnessMin();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setRasterBrightnessMin:(MGLStyleValue<NSNumber *> *)rasterBrightnessMin {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterBrightnessMin);
- _rawLayer->setRasterBrightnessMin(mbglValue);
+- (void)setRasterContrast:(MGLStyleValue<NSNumber *> *)rasterContrast {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterContrast);
+ _rawLayer->setRasterContrast(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)rasterBrightnessMin {
- auto propertyValue = _rawLayer->getRasterBrightnessMin() ?: _rawLayer->getDefaultRasterBrightnessMin();
+- (MGLStyleValue<NSNumber *> *)rasterContrast {
+ auto propertyValue = _rawLayer->getRasterContrast() ?: _rawLayer->getDefaultRasterContrast();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setRasterBrightnessMax:(MGLStyleValue<NSNumber *> *)rasterBrightnessMax {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterBrightnessMax);
- _rawLayer->setRasterBrightnessMax(mbglValue);
+- (void)setRasterFadeDuration:(MGLStyleValue<NSNumber *> *)rasterFadeDuration {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterFadeDuration);
+ _rawLayer->setRasterFadeDuration(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)rasterBrightnessMax {
- auto propertyValue = _rawLayer->getRasterBrightnessMax() ?: _rawLayer->getDefaultRasterBrightnessMax();
+- (MGLStyleValue<NSNumber *> *)rasterFadeDuration {
+ auto propertyValue = _rawLayer->getRasterFadeDuration() ?: _rawLayer->getDefaultRasterFadeDuration();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setRasterSaturation:(MGLStyleValue<NSNumber *> *)rasterSaturation {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterSaturation);
- _rawLayer->setRasterSaturation(mbglValue);
+- (void)setRasterHueRotate:(MGLStyleValue<NSNumber *> *)rasterHueRotate {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterHueRotate);
+ _rawLayer->setRasterHueRotate(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)rasterSaturation {
- auto propertyValue = _rawLayer->getRasterSaturation() ?: _rawLayer->getDefaultRasterSaturation();
+- (MGLStyleValue<NSNumber *> *)rasterHueRotate {
+ auto propertyValue = _rawLayer->getRasterHueRotate() ?: _rawLayer->getDefaultRasterHueRotate();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setRasterContrast:(MGLStyleValue<NSNumber *> *)rasterContrast {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterContrast);
- _rawLayer->setRasterContrast(mbglValue);
+- (void)setRasterOpacity:(MGLStyleValue<NSNumber *> *)rasterOpacity {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterOpacity);
+ _rawLayer->setRasterOpacity(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)rasterContrast {
- auto propertyValue = _rawLayer->getRasterContrast() ?: _rawLayer->getDefaultRasterContrast();
+- (MGLStyleValue<NSNumber *> *)rasterOpacity {
+ auto propertyValue = _rawLayer->getRasterOpacity() ?: _rawLayer->getDefaultRasterOpacity();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setRasterFadeDuration:(MGLStyleValue<NSNumber *> *)rasterFadeDuration {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterFadeDuration);
- _rawLayer->setRasterFadeDuration(mbglValue);
+- (void)setRasterSaturation:(MGLStyleValue<NSNumber *> *)rasterSaturation {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(rasterSaturation);
+ _rawLayer->setRasterSaturation(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)rasterFadeDuration {
- auto propertyValue = _rawLayer->getRasterFadeDuration() ?: _rawLayer->getDefaultRasterFadeDuration();
+- (MGLStyleValue<NSNumber *> *)rasterSaturation {
+ auto propertyValue = _rawLayer->getRasterSaturation() ?: _rawLayer->getDefaultRasterSaturation();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
diff --git a/platform/darwin/src/MGLStyleLayer.mm.ejs b/platform/darwin/src/MGLStyleLayer.mm.ejs
index 8febd69a20..ae90b67d39 100644
--- a/platform/darwin/src/MGLStyleLayer.mm.ejs
+++ b/platform/darwin/src/MGLStyleLayer.mm.ejs
@@ -21,9 +21,9 @@ namespace mbgl {
<% if (layoutProperties.length) { -%>
<% for (const property of layoutProperties) { -%>
<% if (property.type == "enum") { -%>
- MBGL_DEFINE_ENUM(MGL<%- camelize(property.name) %>, {
+ MBGL_DEFINE_ENUM(MGL<%- camelize(originalPropertyName(property)) %>, {
<% for (const value in property.values) { -%>
- { MGL<%- camelize(property.name) %><%- camelize(value) %>, "<%-value%>" },
+ { MGL<%- camelize(originalPropertyName(property)) %><%- camelize(value) %>, "<%-value%>" },
<% } -%>
});
@@ -33,9 +33,9 @@ namespace mbgl {
<% if (paintProperties.length) { -%>
<% for (const property of paintProperties) { -%>
<% if (property.type == "enum") { -%>
- MBGL_DEFINE_ENUM(MGL<%- camelize(property.name) %>, {
+ MBGL_DEFINE_ENUM(MGL<%- camelize(originalPropertyName(property)) %>, {
<% for (const value in property.values) { -%>
- { MGL<%- camelize(property.name) %><%- camelize(value) %>, "<%-value%>" },
+ { MGL<%- camelize(originalPropertyName(property)) %><%- camelize(value) %>, "<%-value%>" },
<% } -%>
});
@@ -133,18 +133,18 @@ namespace mbgl {
<% for (const property of layoutProperties) { -%>
- (void)set<%- camelize(property.name) %>:(MGLStyleValue<<%- propertyType(property, true) %>> *)<%- objCName(property) %> {
<% if (property.type == "enum") { -%>
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>, NSValue *, mbgl::style::<%- mbglType(property) %>, MGL<%- camelize(property.name) %>>().toEnumPropertyValue(<%- objCName(property) %>);
- _rawLayer->set<%- camelize(property.name) %>(mbglValue);
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>, NSValue *, mbgl::style::<%- mbglType(property) %>, MGL<%- camelize(originalPropertyName(property)) %>>().toEnumPropertyValue(<%- objCName(property) %>);
+ _rawLayer->set<%- camelize(originalPropertyName(property)) %>(mbglValue);
<% } else { -%>
auto mbglValue = MGLStyleValueTransformer<<%- valueTransformerArguments(property).join(', ') %>>().toPropertyValue(<%- objCName(property) %>);
- _rawLayer->set<%- camelize(property.name) %>(mbglValue);
+ _rawLayer->set<%- camelize(originalPropertyName(property)) %>(mbglValue);
<% } -%>
}
- (MGLStyleValue<<%- propertyType(property, true) %>> *)<%- objCName(property) %> {
- auto propertyValue = _rawLayer->get<%- camelize(property.name) %>() ?: _rawLayer->getDefault<%- camelize(property.name) %>();
+ auto propertyValue = _rawLayer->get<%- camelize(originalPropertyName(property)) %>() ?: _rawLayer->getDefault<%- camelize(originalPropertyName(property)) %>();
<% if (property.type == "enum") { -%>
- return MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>, NSValue *, mbgl::style::<%- mbglType(property) %>, MGL<%- camelize(property.name) %>>().toEnumStyleValue(propertyValue);
+ return MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>, NSValue *, mbgl::style::<%- mbglType(property) %>, MGL<%- camelize(originalPropertyName(property)) %>>().toEnumStyleValue(propertyValue);
<% } else { -%>
return MGLStyleValueTransformer<<%- valueTransformerArguments(property).join(', ') %>>().toStyleValue(propertyValue);
<% } -%>
@@ -158,18 +158,18 @@ namespace mbgl {
<% for (const property of paintProperties) { -%>
- (void)set<%- camelize(property.name) %>:(MGLStyleValue<<%- propertyType(property, true) %>> *)<%- objCName(property) %> {
<% if (property.type == "enum") { -%>
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>, NSValue *, mbgl::style::<%- mbglType(property) %>, MGL<%- camelize(property.name) %>>().toEnumPropertyValue(<%- objCName(property) %>);
- _rawLayer->set<%- camelize(property.name) %>(mbglValue);
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>, NSValue *, mbgl::style::<%- mbglType(property) %>, MGL<%- camelize(originalPropertyName(property)) %>>().toEnumPropertyValue(<%- objCName(property) %>);
+ _rawLayer->set<%- camelize(originalPropertyName(property)) %>(mbglValue);
<% } else { -%>
auto mbglValue = MGLStyleValueTransformer<<%- valueTransformerArguments(property).join(', ') %>>().toPropertyValue(<%- objCName(property) %>);
- _rawLayer->set<%- camelize(property.name) %>(mbglValue);
+ _rawLayer->set<%- camelize(originalPropertyName(property)) %>(mbglValue);
<% } -%>
}
- (MGLStyleValue<<%- propertyType(property, true) %>> *)<%- objCName(property) %> {
- auto propertyValue = _rawLayer->get<%- camelize(property.name) %>() ?: _rawLayer->getDefault<%- camelize(property.name) %>();
+ auto propertyValue = _rawLayer->get<%- camelize(originalPropertyName(property)) %>() ?: _rawLayer->getDefault<%- camelize(originalPropertyName(property)) %>();
<% if (property.type == "enum") { -%>
- return MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>, NSValue *, mbgl::style::<%- mbglType(property) %>, MGL<%- camelize(property.name) %>>().toEnumStyleValue(propertyValue);
+ return MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>, NSValue *, mbgl::style::<%- mbglType(property) %>, MGL<%- camelize(originalPropertyName(property)) %>>().toEnumStyleValue(propertyValue);
<% } else { -%>
return MGLStyleValueTransformer<<%- valueTransformerArguments(property).join(', ') %>>().toStyleValue(propertyValue);
<% } -%>
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h
index dc0cd236c8..dbb966b4e6 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer.h
+++ b/platform/darwin/src/MGLSymbolStyleLayer.h
@@ -7,22 +7,6 @@
NS_ASSUME_NONNULL_BEGIN
/**
- Label placement relative to its geometry.
-
- Values of this type are used in the `symbolPlacement` property of `MGLSymbolStyleLayer`.
- */
-typedef NS_ENUM(NSUInteger, MGLSymbolPlacement) {
- /**
- The label is placed at the point where the geometry is located.
- */
- MGLSymbolPlacementPoint,
- /**
- The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.
- */
- MGLSymbolPlacementLine,
-};
-
-/**
In combination with `symbolPlacement`, determines the rotation behavior of icons.
Values of this type are used in the `iconRotationAlignment` property of `MGLSymbolStyleLayer`.
@@ -67,43 +51,63 @@ typedef NS_ENUM(NSUInteger, MGLIconTextFit) {
};
/**
- Orientation of text when map is pitched.
+ Label placement relative to its geometry.
- Values of this type are used in the `textPitchAlignment` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `symbolPlacement` property of `MGLSymbolStyleLayer`.
*/
-typedef NS_ENUM(NSUInteger, MGLTextPitchAlignment) {
- /**
- The text is aligned to the plane of the map.
- */
- MGLTextPitchAlignmentMap,
+typedef NS_ENUM(NSUInteger, MGLSymbolPlacement) {
/**
- The text is aligned to the plane of the viewport.
+ The label is placed at the point where the geometry is located.
*/
- MGLTextPitchAlignmentViewport,
+ MGLSymbolPlacementPoint,
/**
- Automatically matches the value of `textRotationAlignment`.
+ The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.
*/
- MGLTextPitchAlignmentAuto,
+ MGLSymbolPlacementLine,
};
/**
- In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
+ Part of the text placed closest to the anchor.
- Values of this type are used in the `textRotationAlignment` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `textAnchor` property of `MGLSymbolStyleLayer`.
*/
-typedef NS_ENUM(NSUInteger, MGLTextRotationAlignment) {
+typedef NS_ENUM(NSUInteger, MGLTextAnchor) {
/**
- When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, aligns text east-west. When `symbolPlacement` is set to `MGLSymbolPlacementLine`, aligns text x-axes with the line.
+ The center of the text is placed closest to the anchor.
*/
- MGLTextRotationAlignmentMap,
+ MGLTextAnchorCenter,
/**
- Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbolPlacement`.
+ The left side of the text is placed closest to the anchor.
*/
- MGLTextRotationAlignmentViewport,
+ MGLTextAnchorLeft,
/**
- When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, this is equivalent to `MGLTextRotationAlignmentViewport`. When `symbolPlacement` is set to `MGLSymbolPlacementLine`, this is equivalent to `MGLTextRotationAlignmentMap`.
+ The right side of the text is placed closest to the anchor.
*/
- MGLTextRotationAlignmentAuto,
+ MGLTextAnchorRight,
+ /**
+ The top of the text is placed closest to the anchor.
+ */
+ MGLTextAnchorTop,
+ /**
+ The bottom of the text is placed closest to the anchor.
+ */
+ MGLTextAnchorBottom,
+ /**
+ The top left corner of the text is placed closest to the anchor.
+ */
+ MGLTextAnchorTopLeft,
+ /**
+ The top right corner of the text is placed closest to the anchor.
+ */
+ MGLTextAnchorTopRight,
+ /**
+ The bottom left corner of the text is placed closest to the anchor.
+ */
+ MGLTextAnchorBottomLeft,
+ /**
+ The bottom right corner of the text is placed closest to the anchor.
+ */
+ MGLTextAnchorBottomRight,
};
/**
@@ -127,47 +131,43 @@ typedef NS_ENUM(NSUInteger, MGLTextJustify) {
};
/**
- Part of the text placed closest to the anchor.
+ Orientation of text when map is pitched.
- Values of this type are used in the `textAnchor` property of `MGLSymbolStyleLayer`.
+ Values of this type are used in the `textPitchAlignment` property of `MGLSymbolStyleLayer`.
*/
-typedef NS_ENUM(NSUInteger, MGLTextAnchor) {
- /**
- The center of the text is placed closest to the anchor.
- */
- MGLTextAnchorCenter,
- /**
- The left side of the text is placed closest to the anchor.
- */
- MGLTextAnchorLeft,
- /**
- The right side of the text is placed closest to the anchor.
- */
- MGLTextAnchorRight,
+typedef NS_ENUM(NSUInteger, MGLTextPitchAlignment) {
/**
- The top of the text is placed closest to the anchor.
+ The text is aligned to the plane of the map.
*/
- MGLTextAnchorTop,
+ MGLTextPitchAlignmentMap,
/**
- The bottom of the text is placed closest to the anchor.
+ The text is aligned to the plane of the viewport.
*/
- MGLTextAnchorBottom,
+ MGLTextPitchAlignmentViewport,
/**
- The top left corner of the text is placed closest to the anchor.
+ Automatically matches the value of `textRotationAlignment`.
*/
- MGLTextAnchorTopLeft,
+ MGLTextPitchAlignmentAuto,
+};
+
+/**
+ In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
+
+ Values of this type are used in the `textRotationAlignment` property of `MGLSymbolStyleLayer`.
+ */
+typedef NS_ENUM(NSUInteger, MGLTextRotationAlignment) {
/**
- The top right corner of the text is placed closest to the anchor.
+ When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, aligns text east-west. When `symbolPlacement` is set to `MGLSymbolPlacementLine`, aligns text x-axes with the line.
*/
- MGLTextAnchorTopRight,
+ MGLTextRotationAlignmentMap,
/**
- The bottom left corner of the text is placed closest to the anchor.
+ Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbolPlacement`.
*/
- MGLTextAnchorBottomLeft,
+ MGLTextRotationAlignmentViewport,
/**
- The bottom right corner of the text is placed closest to the anchor.
+ When `symbolPlacement` is set to `MGLSymbolPlacementPoint`, this is equivalent to `MGLTextRotationAlignmentViewport`. When `symbolPlacement` is set to `MGLSymbolPlacementLine`, this is equivalent to `MGLTextRotationAlignmentMap`.
*/
- MGLTextAnchorBottomRight,
+ MGLTextRotationAlignmentAuto,
};
/**
@@ -233,47 +233,45 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
#pragma mark - Accessing the Layout Attributes
/**
- Label placement relative to its geometry.
+ If true, the icon will be visible even if it collides with other previously drawn symbols.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementPoint`. Set this property to `nil` to reset it to the default value.
+ 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 `iconImage` is non-`nil`. Otherwise, it is ignored.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *symbolPlacement;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconAllowOverlap;
/**
- Distance between two symbol anchors.
-
- This property is measured in points.
+ If true, other symbols can be visible even if they collide with the icon.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `250`. Set this property to `nil` to reset it to the default value.
+ 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 `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImage` is non-`nil`. Otherwise, it is ignored.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolSpacing;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconIgnorePlacement;
/**
- 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.
+ A string with {tokens} replaced, referencing the data property to pull from.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolAvoidEdges;
+@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *iconImageName;
/**
- If true, the icon will be visible even if it collides with other previously drawn symbols.
+ 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 `iconImage` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `iconImage` 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 *> *iconAllowOverlap;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconKeepUpright;
/**
- If true, other symbols can be visible even if they collide with the icon.
+ Offset distance of icon from its anchor.
- 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.
+ The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 from the left and 0 from the top. Set this property to `nil` to reset it to the default value.
This property is only applied to the style if `iconImage` is non-`nil`. Otherwise, it is ignored.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconIgnorePlacement;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconOffset;
/**
If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
@@ -285,6 +283,28 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconOptional;
/**
+ Size of the additional area around the icon bounding box used for detecting symbol collisions.
+
+ This property is measured in points.
+
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `2`. Set this property to `nil` to reset it to the default value.
+
+ This property is only applied to the style if `iconImage` is non-`nil`. Otherwise, it is ignored.
+ */
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconPadding;
+
+/**
+ Rotates the icon clockwise.
+
+ This property is measured in degrees.
+
+ 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 `iconImage` is non-`nil`. Otherwise, it is ignored.
+ */
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconRotate;
+
+/**
In combination with `symbolPlacement`, determines the rotation behavior of icons.
The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLIconRotationAlignmentAuto`. Set this property to `nil` to reset it to the default value.
@@ -323,67 +343,47 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTextFitPadding;
/**
- A string with {tokens} replaced, referencing the data property to pull from.
+ 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.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSString *> *iconImage;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolAvoidEdges;
/**
- Rotates the icon clockwise.
-
- This property is measured in degrees.
-
- 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.
+ Label placement relative to its geometry.
- This property is only applied to the style if `iconImage` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementPoint`. Set this property to `nil` to reset it to the default value.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconRotate;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *symbolPlacement;
/**
- Size of the additional area around the icon bounding box used for detecting symbol collisions.
+ Distance between two symbol anchors.
This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `2`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `250`. Set this property to `nil` to reset it to the default value.
- This property is only applied to the style if `iconImage` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `symbolPlacement` is set to an `MGLStyleValue` object containing an `NSValue` object containing `MGLSymbolPlacementLine`. Otherwise, it is ignored.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconPadding;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolSpacing;
/**
- If true, the icon may be flipped to prevent it from being rendered upside-down.
+ If true, the text will be visible even if it collides with other previously drawn symbols.
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 `iconImage` 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;
-
-/**
- Offset distance of icon from its anchor.
-
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 from the left and 0 from the top. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImage` is non-`nil`. Otherwise, it is ignored.
- */
-@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconOffset;
-
-/**
- Orientation of text when map is pitched.
-
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextPitchAlignmentAuto`. 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 *> *textPitchAlignment;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textAllowOverlap;
/**
- In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
+ Part of the text placed closest to the anchor.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextRotationAlignmentAuto`. 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 `MGLTextAnchorCenter`. 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 *> *textRotationAlignment;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textAnchor;
/**
Value to use for a text label. Feature properties are specified using tokens like {field_name}.
@@ -402,37 +402,31 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSArray<NSString *> *> *textFont;
/**
- Font size.
-
- This property is measured in points.
+ If true, other symbols can be visible even if they collide with the text.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `16`. Set this property to `nil` to reset it to the default value.
+ 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.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textSize;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textIgnorePlacement;
/**
- The maximum line width for text wrapping.
-
- This property is measured in ems.
+ Text justification options.
- 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.
+ 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.
This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textMaxWidth;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textJustify;
/**
- Text leading value for multi-line text.
-
- This property is measured in ems.
+ 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 the float `1.2`. Set this property to `nil` to reset it to the default value.
+ 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`. Otherwise, it is ignored.
+ 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.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textLineHeight;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textKeepUpright;
/**
Text tracking amount.
@@ -446,22 +440,15 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textLetterSpacing;
/**
- 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.
-
- This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
- */
-@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textJustify;
+ Text leading value for multi-line text.
-/**
- Part of the text placed closest to the anchor.
+ This property is measured in ems.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextAnchorCenter`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1.2`. 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 *> *textAnchor;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textLineHeight;
/**
Maximum angle change between adjacent characters.
@@ -475,93 +462,97 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textMaxAngle;
/**
- Rotates the text clockwise.
+ The maximum line width for text wrapping.
- This property is measured in degrees.
+ This property is measured in ems.
- 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.
+ 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 *> *textRotate;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textMaxWidth;
/**
- Size of the additional area around the text bounding box used for detecting symbol collisions.
+ Offset distance of text from its anchor.
- This property is measured in points.
+ This property is measured in ems.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `2`. 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 a `CGVector` struct set to 0 ems from the left and 0 ems from the top. 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 *> *textPadding;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textOffset;
/**
- If true, the text may be flipped vertically to prevent it from being rendered upside-down.
+ If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
- 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.
+ 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`, 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 property is only applied to the style if `textField` is non-`nil`, and `iconImage` is non-`nil`. Otherwise, it is ignored.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textKeepUpright;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textOptional;
/**
- Specifies how to capitalize text.
+ Size of the additional area around the text bounding box used for detecting symbol collisions.
+
+ This property is measured in points.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextTransformNone`. Set this property to `nil` to reset it to the default value.
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `2`. 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 *> *textTransform;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textPadding;
/**
- Offset distance of text from its anchor.
-
- This property is measured in ems.
+ Orientation of text when map is pitched.
- The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing a `CGVector` struct set to 0 ems from the left and 0 ems from the top. 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 `MGLTextPitchAlignmentAuto`. 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 *> *textOffset;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textPitchAlignment;
/**
- If true, the text will be visible even if it collides with other previously drawn symbols.
+ Rotates the text clockwise.
+
+ This property is measured in degrees.
- 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.
+ 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.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textAllowOverlap;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textRotate;
/**
- If true, other symbols can be visible even if they collide with the text.
+ In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
- 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.
+ The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextRotationAlignmentAuto`. 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 *> *textIgnorePlacement;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textRotationAlignment;
/**
- If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
+ Font size.
+
+ This property is measured in points.
- 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.
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `16`. 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 `iconImage` is non-`nil`. Otherwise, it is ignored.
+ This property is only applied to the style if `textField` is non-`nil`. Otherwise, it is ignored.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textOptional;
-
-#pragma mark - Accessing the Paint Attributes
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textSize;
/**
- The opacity at which the icon will be drawn.
+ Specifies how to capitalize text.
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
-
- This property is only applied to the style if `iconImage` is non-`nil`. Otherwise, it is ignored.
+ The default value of this property is an `MGLStyleValue` object containing an `NSValue` object containing `MGLTextTransformNone`. 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 *> *iconOpacity;
+@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTransform;
+
+#pragma mark - Accessing the Paint Attributes
#if TARGET_OS_IPHONE
/**
@@ -583,6 +574,17 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *iconColor;
#endif
+/**
+ Fade out the halo towards the outside.
+
+ This property is measured in points.
+
+ 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 `iconImage` is non-`nil`. Otherwise, it is ignored.
+ */
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconHaloBlur;
+
#if TARGET_OS_IPHONE
/**
The color of the icon's halo. Icon halos can only be used with SDF icons.
@@ -615,15 +617,13 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconHaloWidth;
/**
- Fade out the halo towards the outside.
-
- This property is measured in points.
+ The opacity at which the icon will be drawn.
- 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.
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value.
This property is only applied to the style if `iconImage` is non-`nil`. Otherwise, it is ignored.
*/
-@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconHaloBlur;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconOpacity;
/**
Distance that the icon's anchor is moved from its original placement.
@@ -645,15 +645,6 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslateAnchor;
-/**
- The opacity at which the text will be drawn.
-
- The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. 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 *> *textOpacity;
-
#if TARGET_OS_IPHONE
/**
The color with which the text will be drawn.
@@ -674,6 +665,17 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<MGLColor *> *textColor;
#endif
+/**
+ The halo's fadeout distance towards the outside.
+
+ This property is measured in points.
+
+ 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.
+ */
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textHaloBlur;
+
#if TARGET_OS_IPHONE
/**
The color of the text's halo, which helps it stand out from backgrounds.
@@ -706,15 +708,13 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) {
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textHaloWidth;
/**
- The halo's fadeout distance towards the outside.
-
- This property is measured in points.
+ The opacity at which the text will be drawn.
- 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.
+ The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. 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 *> *textHaloBlur;
+@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *textOpacity;
/**
Distance that the text's anchor is moved from its original placement.
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.mm b/platform/darwin/src/MGLSymbolStyleLayer.mm
index 0acc36d2dc..3e5834f7b0 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer.mm
+++ b/platform/darwin/src/MGLSymbolStyleLayer.mm
@@ -11,11 +11,6 @@
#include <mbgl/style/layers/symbol_layer.hpp>
namespace mbgl {
- MBGL_DEFINE_ENUM(MGLSymbolPlacement, {
- { MGLSymbolPlacementPoint, "point" },
- { MGLSymbolPlacementLine, "line" },
- });
-
MBGL_DEFINE_ENUM(MGLIconRotationAlignment, {
{ MGLIconRotationAlignmentMap, "map" },
{ MGLIconRotationAlignmentViewport, "viewport" },
@@ -29,22 +24,9 @@ namespace mbgl {
{ MGLIconTextFitBoth, "both" },
});
- MBGL_DEFINE_ENUM(MGLTextPitchAlignment, {
- { MGLTextPitchAlignmentMap, "map" },
- { MGLTextPitchAlignmentViewport, "viewport" },
- { MGLTextPitchAlignmentAuto, "auto" },
- });
-
- MBGL_DEFINE_ENUM(MGLTextRotationAlignment, {
- { MGLTextRotationAlignmentMap, "map" },
- { MGLTextRotationAlignmentViewport, "viewport" },
- { MGLTextRotationAlignmentAuto, "auto" },
- });
-
- MBGL_DEFINE_ENUM(MGLTextJustify, {
- { MGLTextJustifyLeft, "left" },
- { MGLTextJustifyCenter, "center" },
- { MGLTextJustifyRight, "right" },
+ MBGL_DEFINE_ENUM(MGLSymbolPlacement, {
+ { MGLSymbolPlacementPoint, "point" },
+ { MGLSymbolPlacementLine, "line" },
});
MBGL_DEFINE_ENUM(MGLTextAnchor, {
@@ -59,6 +41,24 @@ namespace mbgl {
{ MGLTextAnchorBottomRight, "bottom-right" },
});
+ MBGL_DEFINE_ENUM(MGLTextJustify, {
+ { MGLTextJustifyLeft, "left" },
+ { MGLTextJustifyCenter, "center" },
+ { MGLTextJustifyRight, "right" },
+ });
+
+ MBGL_DEFINE_ENUM(MGLTextPitchAlignment, {
+ { MGLTextPitchAlignmentMap, "map" },
+ { MGLTextPitchAlignmentViewport, "viewport" },
+ { MGLTextPitchAlignmentAuto, "auto" },
+ });
+
+ MBGL_DEFINE_ENUM(MGLTextRotationAlignment, {
+ { MGLTextRotationAlignmentMap, "map" },
+ { MGLTextRotationAlignmentViewport, "viewport" },
+ { MGLTextRotationAlignmentAuto, "auto" },
+ });
+
MBGL_DEFINE_ENUM(MGLTextTransform, {
{ MGLTextTransformNone, "none" },
{ MGLTextTransformUppercase, "uppercase" },
@@ -146,54 +146,54 @@ namespace mbgl {
#pragma mark - Accessing the Layout Attributes
-- (void)setSymbolPlacement:(MGLStyleValue<NSValue *> *)symbolPlacement {
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::SymbolPlacementType, NSValue *, mbgl::style::SymbolPlacementType, MGLSymbolPlacement>().toEnumPropertyValue(symbolPlacement);
- _rawLayer->setSymbolPlacement(mbglValue);
+- (void)setIconAllowOverlap:(MGLStyleValue<NSNumber *> *)iconAllowOverlap {
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconAllowOverlap);
+ _rawLayer->setIconAllowOverlap(mbglValue);
}
-- (MGLStyleValue<NSValue *> *)symbolPlacement {
- auto propertyValue = _rawLayer->getSymbolPlacement() ?: _rawLayer->getDefaultSymbolPlacement();
- return MGLStyleValueTransformer<mbgl::style::SymbolPlacementType, NSValue *, mbgl::style::SymbolPlacementType, MGLSymbolPlacement>().toEnumStyleValue(propertyValue);
+- (MGLStyleValue<NSNumber *> *)iconAllowOverlap {
+ auto propertyValue = _rawLayer->getIconAllowOverlap() ?: _rawLayer->getDefaultIconAllowOverlap();
+ return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setSymbolSpacing:(MGLStyleValue<NSNumber *> *)symbolSpacing {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(symbolSpacing);
- _rawLayer->setSymbolSpacing(mbglValue);
+- (void)setIconIgnorePlacement:(MGLStyleValue<NSNumber *> *)iconIgnorePlacement {
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconIgnorePlacement);
+ _rawLayer->setIconIgnorePlacement(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)symbolSpacing {
- auto propertyValue = _rawLayer->getSymbolSpacing() ?: _rawLayer->getDefaultSymbolSpacing();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSNumber *> *)iconIgnorePlacement {
+ auto propertyValue = _rawLayer->getIconIgnorePlacement() ?: _rawLayer->getDefaultIconIgnorePlacement();
+ return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setSymbolAvoidEdges:(MGLStyleValue<NSNumber *> *)symbolAvoidEdges {
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(symbolAvoidEdges);
- _rawLayer->setSymbolAvoidEdges(mbglValue);
+- (void)setIconImageName:(MGLStyleValue<NSString *> *)iconImageName {
+ auto mbglValue = MGLStyleValueTransformer<std::string, NSString *>().toPropertyValue(iconImageName);
+ _rawLayer->setIconImage(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)symbolAvoidEdges {
- auto propertyValue = _rawLayer->getSymbolAvoidEdges() ?: _rawLayer->getDefaultSymbolAvoidEdges();
- return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSString *> *)iconImageName {
+ auto propertyValue = _rawLayer->getIconImage() ?: _rawLayer->getDefaultIconImage();
+ return MGLStyleValueTransformer<std::string, NSString *>().toStyleValue(propertyValue);
}
-- (void)setIconAllowOverlap:(MGLStyleValue<NSNumber *> *)iconAllowOverlap {
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconAllowOverlap);
- _rawLayer->setIconAllowOverlap(mbglValue);
+- (void)setIconKeepUpright:(MGLStyleValue<NSNumber *> *)iconKeepUpright {
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconKeepUpright);
+ _rawLayer->setIconKeepUpright(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconAllowOverlap {
- auto propertyValue = _rawLayer->getIconAllowOverlap() ?: _rawLayer->getDefaultIconAllowOverlap();
+- (MGLStyleValue<NSNumber *> *)iconKeepUpright {
+ auto propertyValue = _rawLayer->getIconKeepUpright() ?: _rawLayer->getDefaultIconKeepUpright();
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setIconIgnorePlacement:(MGLStyleValue<NSNumber *> *)iconIgnorePlacement {
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconIgnorePlacement);
- _rawLayer->setIconIgnorePlacement(mbglValue);
+- (void)setIconOffset:(MGLStyleValue<NSValue *> *)iconOffset {
+ auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(iconOffset);
+ _rawLayer->setIconOffset(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconIgnorePlacement {
- auto propertyValue = _rawLayer->getIconIgnorePlacement() ?: _rawLayer->getDefaultIconIgnorePlacement();
- return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSValue *> *)iconOffset {
+ auto propertyValue = _rawLayer->getIconOffset() ?: _rawLayer->getDefaultIconOffset();
+ return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
}
- (void)setIconOptional:(MGLStyleValue<NSNumber *> *)iconOptional {
@@ -206,6 +206,26 @@ namespace mbgl {
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
+- (void)setIconPadding:(MGLStyleValue<NSNumber *> *)iconPadding {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconPadding);
+ _rawLayer->setIconPadding(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)iconPadding {
+ auto propertyValue = _rawLayer->getIconPadding() ?: _rawLayer->getDefaultIconPadding();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
+- (void)setIconRotate:(MGLStyleValue<NSNumber *> *)iconRotate {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconRotate);
+ _rawLayer->setIconRotate(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)iconRotate {
+ auto propertyValue = _rawLayer->getIconRotate() ?: _rawLayer->getDefaultIconRotate();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
- (void)setIconRotationAlignment:(MGLStyleValue<NSValue *> *)iconRotationAlignment {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLIconRotationAlignment>().toEnumPropertyValue(iconRotationAlignment);
_rawLayer->setIconRotationAlignment(mbglValue);
@@ -246,74 +266,54 @@ namespace mbgl {
return MGLStyleValueTransformer<std::array<float, 4>, NSValue *>().toStyleValue(propertyValue);
}
-- (void)setIconImage:(MGLStyleValue<NSString *> *)iconImage {
- auto mbglValue = MGLStyleValueTransformer<std::string, NSString *>().toPropertyValue(iconImage);
- _rawLayer->setIconImage(mbglValue);
+- (void)setSymbolAvoidEdges:(MGLStyleValue<NSNumber *> *)symbolAvoidEdges {
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(symbolAvoidEdges);
+ _rawLayer->setSymbolAvoidEdges(mbglValue);
}
-- (MGLStyleValue<NSString *> *)iconImage {
- auto propertyValue = _rawLayer->getIconImage() ?: _rawLayer->getDefaultIconImage();
- return MGLStyleValueTransformer<std::string, NSString *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSNumber *> *)symbolAvoidEdges {
+ auto propertyValue = _rawLayer->getSymbolAvoidEdges() ?: _rawLayer->getDefaultSymbolAvoidEdges();
+ return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setIconRotate:(MGLStyleValue<NSNumber *> *)iconRotate {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconRotate);
- _rawLayer->setIconRotate(mbglValue);
+- (void)setSymbolPlacement:(MGLStyleValue<NSValue *> *)symbolPlacement {
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::SymbolPlacementType, NSValue *, mbgl::style::SymbolPlacementType, MGLSymbolPlacement>().toEnumPropertyValue(symbolPlacement);
+ _rawLayer->setSymbolPlacement(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconRotate {
- auto propertyValue = _rawLayer->getIconRotate() ?: _rawLayer->getDefaultIconRotate();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSValue *> *)symbolPlacement {
+ auto propertyValue = _rawLayer->getSymbolPlacement() ?: _rawLayer->getDefaultSymbolPlacement();
+ return MGLStyleValueTransformer<mbgl::style::SymbolPlacementType, NSValue *, mbgl::style::SymbolPlacementType, MGLSymbolPlacement>().toEnumStyleValue(propertyValue);
}
-- (void)setIconPadding:(MGLStyleValue<NSNumber *> *)iconPadding {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconPadding);
- _rawLayer->setIconPadding(mbglValue);
+- (void)setSymbolSpacing:(MGLStyleValue<NSNumber *> *)symbolSpacing {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(symbolSpacing);
+ _rawLayer->setSymbolSpacing(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconPadding {
- auto propertyValue = _rawLayer->getIconPadding() ?: _rawLayer->getDefaultIconPadding();
+- (MGLStyleValue<NSNumber *> *)symbolSpacing {
+ auto propertyValue = _rawLayer->getSymbolSpacing() ?: _rawLayer->getDefaultSymbolSpacing();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setIconKeepUpright:(MGLStyleValue<NSNumber *> *)iconKeepUpright {
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconKeepUpright);
- _rawLayer->setIconKeepUpright(mbglValue);
+- (void)setTextAllowOverlap:(MGLStyleValue<NSNumber *> *)textAllowOverlap {
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textAllowOverlap);
+ _rawLayer->setTextAllowOverlap(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconKeepUpright {
- auto propertyValue = _rawLayer->getIconKeepUpright() ?: _rawLayer->getDefaultIconKeepUpright();
+- (MGLStyleValue<NSNumber *> *)textAllowOverlap {
+ auto propertyValue = _rawLayer->getTextAllowOverlap() ?: _rawLayer->getDefaultTextAllowOverlap();
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setIconOffset:(MGLStyleValue<NSValue *> *)iconOffset {
- auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(iconOffset);
- _rawLayer->setIconOffset(mbglValue);
-}
-
-- (MGLStyleValue<NSValue *> *)iconOffset {
- auto propertyValue = _rawLayer->getIconOffset() ?: _rawLayer->getDefaultIconOffset();
- return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
-}
-
-- (void)setTextPitchAlignment:(MGLStyleValue<NSValue *> *)textPitchAlignment {
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextPitchAlignment>().toEnumPropertyValue(textPitchAlignment);
- _rawLayer->setTextPitchAlignment(mbglValue);
-}
-
-- (MGLStyleValue<NSValue *> *)textPitchAlignment {
- auto propertyValue = _rawLayer->getTextPitchAlignment() ?: _rawLayer->getDefaultTextPitchAlignment();
- return MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextPitchAlignment>().toEnumStyleValue(propertyValue);
-}
-
-- (void)setTextRotationAlignment:(MGLStyleValue<NSValue *> *)textRotationAlignment {
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextRotationAlignment>().toEnumPropertyValue(textRotationAlignment);
- _rawLayer->setTextRotationAlignment(mbglValue);
+- (void)setTextAnchor:(MGLStyleValue<NSValue *> *)textAnchor {
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextAnchorType, NSValue *, mbgl::style::TextAnchorType, MGLTextAnchor>().toEnumPropertyValue(textAnchor);
+ _rawLayer->setTextAnchor(mbglValue);
}
-- (MGLStyleValue<NSValue *> *)textRotationAlignment {
- auto propertyValue = _rawLayer->getTextRotationAlignment() ?: _rawLayer->getDefaultTextRotationAlignment();
- return MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextRotationAlignment>().toEnumStyleValue(propertyValue);
+- (MGLStyleValue<NSValue *> *)textAnchor {
+ auto propertyValue = _rawLayer->getTextAnchor() ?: _rawLayer->getDefaultTextAnchor();
+ return MGLStyleValueTransformer<mbgl::style::TextAnchorType, NSValue *, mbgl::style::TextAnchorType, MGLTextAnchor>().toEnumStyleValue(propertyValue);
}
- (void)setTextField:(MGLStyleValue<NSString *> *)textField {
@@ -336,34 +336,34 @@ namespace mbgl {
return MGLStyleValueTransformer<std::vector<std::string>, NSArray<NSString *> *, std::string>().toStyleValue(propertyValue);
}
-- (void)setTextSize:(MGLStyleValue<NSNumber *> *)textSize {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textSize);
- _rawLayer->setTextSize(mbglValue);
+- (void)setTextIgnorePlacement:(MGLStyleValue<NSNumber *> *)textIgnorePlacement {
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textIgnorePlacement);
+ _rawLayer->setTextIgnorePlacement(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textSize {
- auto propertyValue = _rawLayer->getTextSize() ?: _rawLayer->getDefaultTextSize();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSNumber *> *)textIgnorePlacement {
+ auto propertyValue = _rawLayer->getTextIgnorePlacement() ?: _rawLayer->getDefaultTextIgnorePlacement();
+ return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setTextMaxWidth:(MGLStyleValue<NSNumber *> *)textMaxWidth {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textMaxWidth);
- _rawLayer->setTextMaxWidth(mbglValue);
+- (void)setTextJustify:(MGLStyleValue<NSValue *> *)textJustify {
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextJustifyType, NSValue *, mbgl::style::TextJustifyType, MGLTextJustify>().toEnumPropertyValue(textJustify);
+ _rawLayer->setTextJustify(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textMaxWidth {
- auto propertyValue = _rawLayer->getTextMaxWidth() ?: _rawLayer->getDefaultTextMaxWidth();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSValue *> *)textJustify {
+ auto propertyValue = _rawLayer->getTextJustify() ?: _rawLayer->getDefaultTextJustify();
+ return MGLStyleValueTransformer<mbgl::style::TextJustifyType, NSValue *, mbgl::style::TextJustifyType, MGLTextJustify>().toEnumStyleValue(propertyValue);
}
-- (void)setTextLineHeight:(MGLStyleValue<NSNumber *> *)textLineHeight {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textLineHeight);
- _rawLayer->setTextLineHeight(mbglValue);
+- (void)setTextKeepUpright:(MGLStyleValue<NSNumber *> *)textKeepUpright {
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textKeepUpright);
+ _rawLayer->setTextKeepUpright(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textLineHeight {
- auto propertyValue = _rawLayer->getTextLineHeight() ?: _rawLayer->getDefaultTextLineHeight();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSNumber *> *)textKeepUpright {
+ auto propertyValue = _rawLayer->getTextKeepUpright() ?: _rawLayer->getDefaultTextKeepUpright();
+ return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
- (void)setTextLetterSpacing:(MGLStyleValue<NSNumber *> *)textLetterSpacing {
@@ -376,24 +376,14 @@ namespace mbgl {
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setTextJustify:(MGLStyleValue<NSValue *> *)textJustify {
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextJustifyType, NSValue *, mbgl::style::TextJustifyType, MGLTextJustify>().toEnumPropertyValue(textJustify);
- _rawLayer->setTextJustify(mbglValue);
-}
-
-- (MGLStyleValue<NSValue *> *)textJustify {
- auto propertyValue = _rawLayer->getTextJustify() ?: _rawLayer->getDefaultTextJustify();
- return MGLStyleValueTransformer<mbgl::style::TextJustifyType, NSValue *, mbgl::style::TextJustifyType, MGLTextJustify>().toEnumStyleValue(propertyValue);
-}
-
-- (void)setTextAnchor:(MGLStyleValue<NSValue *> *)textAnchor {
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextAnchorType, NSValue *, mbgl::style::TextAnchorType, MGLTextAnchor>().toEnumPropertyValue(textAnchor);
- _rawLayer->setTextAnchor(mbglValue);
+- (void)setTextLineHeight:(MGLStyleValue<NSNumber *> *)textLineHeight {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textLineHeight);
+ _rawLayer->setTextLineHeight(mbglValue);
}
-- (MGLStyleValue<NSValue *> *)textAnchor {
- auto propertyValue = _rawLayer->getTextAnchor() ?: _rawLayer->getDefaultTextAnchor();
- return MGLStyleValueTransformer<mbgl::style::TextAnchorType, NSValue *, mbgl::style::TextAnchorType, MGLTextAnchor>().toEnumStyleValue(propertyValue);
+- (MGLStyleValue<NSNumber *> *)textLineHeight {
+ auto propertyValue = _rawLayer->getTextLineHeight() ?: _rawLayer->getDefaultTextLineHeight();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
- (void)setTextMaxAngle:(MGLStyleValue<NSNumber *> *)textMaxAngle {
@@ -406,98 +396,98 @@ namespace mbgl {
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setTextRotate:(MGLStyleValue<NSNumber *> *)textRotate {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textRotate);
- _rawLayer->setTextRotate(mbglValue);
+- (void)setTextMaxWidth:(MGLStyleValue<NSNumber *> *)textMaxWidth {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textMaxWidth);
+ _rawLayer->setTextMaxWidth(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textRotate {
- auto propertyValue = _rawLayer->getTextRotate() ?: _rawLayer->getDefaultTextRotate();
+- (MGLStyleValue<NSNumber *> *)textMaxWidth {
+ auto propertyValue = _rawLayer->getTextMaxWidth() ?: _rawLayer->getDefaultTextMaxWidth();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setTextPadding:(MGLStyleValue<NSNumber *> *)textPadding {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textPadding);
- _rawLayer->setTextPadding(mbglValue);
+- (void)setTextOffset:(MGLStyleValue<NSValue *> *)textOffset {
+ auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(textOffset);
+ _rawLayer->setTextOffset(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textPadding {
- auto propertyValue = _rawLayer->getTextPadding() ?: _rawLayer->getDefaultTextPadding();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSValue *> *)textOffset {
+ auto propertyValue = _rawLayer->getTextOffset() ?: _rawLayer->getDefaultTextOffset();
+ return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
}
-- (void)setTextKeepUpright:(MGLStyleValue<NSNumber *> *)textKeepUpright {
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textKeepUpright);
- _rawLayer->setTextKeepUpright(mbglValue);
+- (void)setTextOptional:(MGLStyleValue<NSNumber *> *)textOptional {
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textOptional);
+ _rawLayer->setTextOptional(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textKeepUpright {
- auto propertyValue = _rawLayer->getTextKeepUpright() ?: _rawLayer->getDefaultTextKeepUpright();
+- (MGLStyleValue<NSNumber *> *)textOptional {
+ auto propertyValue = _rawLayer->getTextOptional() ?: _rawLayer->getDefaultTextOptional();
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setTextTransform:(MGLStyleValue<NSValue *> *)textTransform {
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextTransformType, NSValue *, mbgl::style::TextTransformType, MGLTextTransform>().toEnumPropertyValue(textTransform);
- _rawLayer->setTextTransform(mbglValue);
+- (void)setTextPadding:(MGLStyleValue<NSNumber *> *)textPadding {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textPadding);
+ _rawLayer->setTextPadding(mbglValue);
}
-- (MGLStyleValue<NSValue *> *)textTransform {
- auto propertyValue = _rawLayer->getTextTransform() ?: _rawLayer->getDefaultTextTransform();
- return MGLStyleValueTransformer<mbgl::style::TextTransformType, NSValue *, mbgl::style::TextTransformType, MGLTextTransform>().toEnumStyleValue(propertyValue);
+- (MGLStyleValue<NSNumber *> *)textPadding {
+ auto propertyValue = _rawLayer->getTextPadding() ?: _rawLayer->getDefaultTextPadding();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setTextOffset:(MGLStyleValue<NSValue *> *)textOffset {
- auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(textOffset);
- _rawLayer->setTextOffset(mbglValue);
+- (void)setTextPitchAlignment:(MGLStyleValue<NSValue *> *)textPitchAlignment {
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextPitchAlignment>().toEnumPropertyValue(textPitchAlignment);
+ _rawLayer->setTextPitchAlignment(mbglValue);
}
-- (MGLStyleValue<NSValue *> *)textOffset {
- auto propertyValue = _rawLayer->getTextOffset() ?: _rawLayer->getDefaultTextOffset();
- return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSValue *> *)textPitchAlignment {
+ auto propertyValue = _rawLayer->getTextPitchAlignment() ?: _rawLayer->getDefaultTextPitchAlignment();
+ return MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextPitchAlignment>().toEnumStyleValue(propertyValue);
}
-- (void)setTextAllowOverlap:(MGLStyleValue<NSNumber *> *)textAllowOverlap {
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textAllowOverlap);
- _rawLayer->setTextAllowOverlap(mbglValue);
+- (void)setTextRotate:(MGLStyleValue<NSNumber *> *)textRotate {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textRotate);
+ _rawLayer->setTextRotate(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textAllowOverlap {
- auto propertyValue = _rawLayer->getTextAllowOverlap() ?: _rawLayer->getDefaultTextAllowOverlap();
- return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSNumber *> *)textRotate {
+ auto propertyValue = _rawLayer->getTextRotate() ?: _rawLayer->getDefaultTextRotate();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setTextIgnorePlacement:(MGLStyleValue<NSNumber *> *)textIgnorePlacement {
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textIgnorePlacement);
- _rawLayer->setTextIgnorePlacement(mbglValue);
+- (void)setTextRotationAlignment:(MGLStyleValue<NSValue *> *)textRotationAlignment {
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextRotationAlignment>().toEnumPropertyValue(textRotationAlignment);
+ _rawLayer->setTextRotationAlignment(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textIgnorePlacement {
- auto propertyValue = _rawLayer->getTextIgnorePlacement() ?: _rawLayer->getDefaultTextIgnorePlacement();
- return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSValue *> *)textRotationAlignment {
+ auto propertyValue = _rawLayer->getTextRotationAlignment() ?: _rawLayer->getDefaultTextRotationAlignment();
+ return MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextRotationAlignment>().toEnumStyleValue(propertyValue);
}
-- (void)setTextOptional:(MGLStyleValue<NSNumber *> *)textOptional {
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textOptional);
- _rawLayer->setTextOptional(mbglValue);
+- (void)setTextSize:(MGLStyleValue<NSNumber *> *)textSize {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textSize);
+ _rawLayer->setTextSize(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textOptional {
- auto propertyValue = _rawLayer->getTextOptional() ?: _rawLayer->getDefaultTextOptional();
- return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSNumber *> *)textSize {
+ auto propertyValue = _rawLayer->getTextSize() ?: _rawLayer->getDefaultTextSize();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-#pragma mark - Accessing the Paint Attributes
-
-- (void)setIconOpacity:(MGLStyleValue<NSNumber *> *)iconOpacity {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconOpacity);
- _rawLayer->setIconOpacity(mbglValue);
+- (void)setTextTransform:(MGLStyleValue<NSValue *> *)textTransform {
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextTransformType, NSValue *, mbgl::style::TextTransformType, MGLTextTransform>().toEnumPropertyValue(textTransform);
+ _rawLayer->setTextTransform(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconOpacity {
- auto propertyValue = _rawLayer->getIconOpacity() ?: _rawLayer->getDefaultIconOpacity();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSValue *> *)textTransform {
+ auto propertyValue = _rawLayer->getTextTransform() ?: _rawLayer->getDefaultTextTransform();
+ return MGLStyleValueTransformer<mbgl::style::TextTransformType, NSValue *, mbgl::style::TextTransformType, MGLTextTransform>().toEnumStyleValue(propertyValue);
}
+#pragma mark - Accessing the Paint Attributes
+
- (void)setIconColor:(MGLStyleValue<MGLColor *> *)iconColor {
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(iconColor);
_rawLayer->setIconColor(mbglValue);
@@ -508,6 +498,16 @@ namespace mbgl {
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
+- (void)setIconHaloBlur:(MGLStyleValue<NSNumber *> *)iconHaloBlur {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconHaloBlur);
+ _rawLayer->setIconHaloBlur(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)iconHaloBlur {
+ auto propertyValue = _rawLayer->getIconHaloBlur() ?: _rawLayer->getDefaultIconHaloBlur();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
- (void)setIconHaloColor:(MGLStyleValue<MGLColor *> *)iconHaloColor {
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(iconHaloColor);
_rawLayer->setIconHaloColor(mbglValue);
@@ -528,13 +528,13 @@ namespace mbgl {
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setIconHaloBlur:(MGLStyleValue<NSNumber *> *)iconHaloBlur {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconHaloBlur);
- _rawLayer->setIconHaloBlur(mbglValue);
+- (void)setIconOpacity:(MGLStyleValue<NSNumber *> *)iconOpacity {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconOpacity);
+ _rawLayer->setIconOpacity(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconHaloBlur {
- auto propertyValue = _rawLayer->getIconHaloBlur() ?: _rawLayer->getDefaultIconHaloBlur();
+- (MGLStyleValue<NSNumber *> *)iconOpacity {
+ auto propertyValue = _rawLayer->getIconOpacity() ?: _rawLayer->getDefaultIconOpacity();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -558,16 +558,6 @@ namespace mbgl {
return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLIconTranslateAnchor>().toEnumStyleValue(propertyValue);
}
-- (void)setTextOpacity:(MGLStyleValue<NSNumber *> *)textOpacity {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textOpacity);
- _rawLayer->setTextOpacity(mbglValue);
-}
-
-- (MGLStyleValue<NSNumber *> *)textOpacity {
- auto propertyValue = _rawLayer->getTextOpacity() ?: _rawLayer->getDefaultTextOpacity();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
-}
-
- (void)setTextColor:(MGLStyleValue<MGLColor *> *)textColor {
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(textColor);
_rawLayer->setTextColor(mbglValue);
@@ -578,6 +568,16 @@ namespace mbgl {
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
+- (void)setTextHaloBlur:(MGLStyleValue<NSNumber *> *)textHaloBlur {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textHaloBlur);
+ _rawLayer->setTextHaloBlur(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)textHaloBlur {
+ auto propertyValue = _rawLayer->getTextHaloBlur() ?: _rawLayer->getDefaultTextHaloBlur();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
- (void)setTextHaloColor:(MGLStyleValue<MGLColor *> *)textHaloColor {
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(textHaloColor);
_rawLayer->setTextHaloColor(mbglValue);
@@ -598,13 +598,13 @@ namespace mbgl {
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setTextHaloBlur:(MGLStyleValue<NSNumber *> *)textHaloBlur {
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textHaloBlur);
- _rawLayer->setTextHaloBlur(mbglValue);
+- (void)setTextOpacity:(MGLStyleValue<NSNumber *> *)textOpacity {
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textOpacity);
+ _rawLayer->setTextOpacity(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textHaloBlur {
- auto propertyValue = _rawLayer->getTextHaloBlur() ?: _rawLayer->getDefaultTextHaloBlur();
+- (MGLStyleValue<NSNumber *> *)textOpacity {
+ auto propertyValue = _rawLayer->getTextOpacity() ?: _rawLayer->getDefaultTextOpacity();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
diff --git a/platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.h b/platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.h
index 835b22b02f..8aa07b2a0c 100644
--- a/platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.h
+++ b/platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.h
@@ -46,19 +46,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (readonly) MGLLineJoin MGLLineJoinValue;
/**
- Creates a new value object containing the given `MGLSymbolPlacement` enumeration.
-
- @param type The value for the new object.
- @return A new value object that contains the style enumeration type.
-*/
-+ (instancetype)valueWithMGLSymbolPlacement:(MGLSymbolPlacement)symbolPlacement;
-
-/**
- The `MGLSymbolPlacement` enumeration representation of the value.
-*/
-@property (readonly) MGLSymbolPlacement MGLSymbolPlacementValue;
-
-/**
Creates a new value object containing the given `MGLIconRotationAlignment` enumeration.
@param type The value for the new object.
@@ -85,30 +72,30 @@ NS_ASSUME_NONNULL_BEGIN
@property (readonly) MGLIconTextFit MGLIconTextFitValue;
/**
- Creates a new value object containing the given `MGLTextPitchAlignment` enumeration.
+ Creates a new value object containing the given `MGLSymbolPlacement` enumeration.
@param type The value for the new object.
@return A new value object that contains the style enumeration type.
*/
-+ (instancetype)valueWithMGLTextPitchAlignment:(MGLTextPitchAlignment)textPitchAlignment;
++ (instancetype)valueWithMGLSymbolPlacement:(MGLSymbolPlacement)symbolPlacement;
/**
- The `MGLTextPitchAlignment` enumeration representation of the value.
+ The `MGLSymbolPlacement` enumeration representation of the value.
*/
-@property (readonly) MGLTextPitchAlignment MGLTextPitchAlignmentValue;
+@property (readonly) MGLSymbolPlacement MGLSymbolPlacementValue;
/**
- Creates a new value object containing the given `MGLTextRotationAlignment` enumeration.
+ Creates a new value object containing the given `MGLTextAnchor` enumeration.
@param type The value for the new object.
@return A new value object that contains the style enumeration type.
*/
-+ (instancetype)valueWithMGLTextRotationAlignment:(MGLTextRotationAlignment)textRotationAlignment;
++ (instancetype)valueWithMGLTextAnchor:(MGLTextAnchor)textAnchor;
/**
- The `MGLTextRotationAlignment` enumeration representation of the value.
+ The `MGLTextAnchor` enumeration representation of the value.
*/
-@property (readonly) MGLTextRotationAlignment MGLTextRotationAlignmentValue;
+@property (readonly) MGLTextAnchor MGLTextAnchorValue;
/**
Creates a new value object containing the given `MGLTextJustify` enumeration.
@@ -124,17 +111,30 @@ NS_ASSUME_NONNULL_BEGIN
@property (readonly) MGLTextJustify MGLTextJustifyValue;
/**
- Creates a new value object containing the given `MGLTextAnchor` enumeration.
+ Creates a new value object containing the given `MGLTextPitchAlignment` enumeration.
@param type The value for the new object.
@return A new value object that contains the style enumeration type.
*/
-+ (instancetype)valueWithMGLTextAnchor:(MGLTextAnchor)textAnchor;
++ (instancetype)valueWithMGLTextPitchAlignment:(MGLTextPitchAlignment)textPitchAlignment;
/**
- The `MGLTextAnchor` enumeration representation of the value.
+ The `MGLTextPitchAlignment` enumeration representation of the value.
*/
-@property (readonly) MGLTextAnchor MGLTextAnchorValue;
+@property (readonly) MGLTextPitchAlignment MGLTextPitchAlignmentValue;
+
+/**
+ Creates a new value object containing the given `MGLTextRotationAlignment` enumeration.
+
+ @param type The value for the new object.
+ @return A new value object that contains the style enumeration type.
+*/
++ (instancetype)valueWithMGLTextRotationAlignment:(MGLTextRotationAlignment)textRotationAlignment;
+
+/**
+ The `MGLTextRotationAlignment` enumeration representation of the value.
+*/
+@property (readonly) MGLTextRotationAlignment MGLTextRotationAlignmentValue;
/**
Creates a new value object containing the given `MGLTextTransform` enumeration.
@@ -202,30 +202,30 @@ NS_ASSUME_NONNULL_BEGIN
@property (readonly) MGLTextTranslateAnchor MGLTextTranslateAnchorValue;
/**
- Creates a new value object containing the given `MGLCircleTranslateAnchor` structure.
+ Creates a new value object containing the given `MGLCirclePitchScale` structure.
@param type The value for the new object.
@return A new value object that contains the style enumeration type.
*/
-+ (instancetype)valueWithMGLCircleTranslateAnchor:(MGLCircleTranslateAnchor)circleTranslateAnchor;
++ (instancetype)valueWithMGLCirclePitchScale:(MGLCirclePitchScale)circlePitchScale;
/**
- The `MGLCircleTranslateAnchor` enumeration representation of the value.
+ The `MGLCirclePitchScale` enumeration representation of the value.
*/
-@property (readonly) MGLCircleTranslateAnchor MGLCircleTranslateAnchorValue;
+@property (readonly) MGLCirclePitchScale MGLCirclePitchScaleValue;
/**
- Creates a new value object containing the given `MGLCirclePitchScale` structure.
+ Creates a new value object containing the given `MGLCircleTranslateAnchor` structure.
@param type The value for the new object.
@return A new value object that contains the style enumeration type.
*/
-+ (instancetype)valueWithMGLCirclePitchScale:(MGLCirclePitchScale)circlePitchScale;
++ (instancetype)valueWithMGLCircleTranslateAnchor:(MGLCircleTranslateAnchor)circleTranslateAnchor;
/**
- The `MGLCirclePitchScale` enumeration representation of the value.
+ The `MGLCircleTranslateAnchor` enumeration representation of the value.
*/
-@property (readonly) MGLCirclePitchScale MGLCirclePitchScaleValue;
+@property (readonly) MGLCircleTranslateAnchor MGLCircleTranslateAnchorValue;
@end
diff --git a/platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.mm b/platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.mm
index b6a64a785f..89f0c07a5a 100644
--- a/platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.mm
+++ b/platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.mm
@@ -25,16 +25,6 @@
return value;
}
-+ (NSValue *)valueWithMGLSymbolPlacement:(MGLSymbolPlacement)symbolPlacement {
- return [NSValue value:&symbolPlacement withObjCType:@encode(MGLSymbolPlacement)];
-}
-
-- (MGLSymbolPlacement)MGLSymbolPlacementValue {
- MGLSymbolPlacement value;
- [self getValue:&value];
- return value;
-}
-
+ (NSValue *)valueWithMGLIconRotationAlignment:(MGLIconRotationAlignment)iconRotationAlignment {
return [NSValue value:&iconRotationAlignment withObjCType:@encode(MGLIconRotationAlignment)];
}
@@ -55,22 +45,22 @@
return value;
}
-+ (NSValue *)valueWithMGLTextPitchAlignment:(MGLTextPitchAlignment)textPitchAlignment {
- return [NSValue value:&textPitchAlignment withObjCType:@encode(MGLTextPitchAlignment)];
++ (NSValue *)valueWithMGLSymbolPlacement:(MGLSymbolPlacement)symbolPlacement {
+ return [NSValue value:&symbolPlacement withObjCType:@encode(MGLSymbolPlacement)];
}
-- (MGLTextPitchAlignment)MGLTextPitchAlignmentValue {
- MGLTextPitchAlignment value;
+- (MGLSymbolPlacement)MGLSymbolPlacementValue {
+ MGLSymbolPlacement value;
[self getValue:&value];
return value;
}
-+ (NSValue *)valueWithMGLTextRotationAlignment:(MGLTextRotationAlignment)textRotationAlignment {
- return [NSValue value:&textRotationAlignment withObjCType:@encode(MGLTextRotationAlignment)];
++ (NSValue *)valueWithMGLTextAnchor:(MGLTextAnchor)textAnchor {
+ return [NSValue value:&textAnchor withObjCType:@encode(MGLTextAnchor)];
}
-- (MGLTextRotationAlignment)MGLTextRotationAlignmentValue {
- MGLTextRotationAlignment value;
+- (MGLTextAnchor)MGLTextAnchorValue {
+ MGLTextAnchor value;
[self getValue:&value];
return value;
}
@@ -85,12 +75,22 @@
return value;
}
-+ (NSValue *)valueWithMGLTextAnchor:(MGLTextAnchor)textAnchor {
- return [NSValue value:&textAnchor withObjCType:@encode(MGLTextAnchor)];
++ (NSValue *)valueWithMGLTextPitchAlignment:(MGLTextPitchAlignment)textPitchAlignment {
+ return [NSValue value:&textPitchAlignment withObjCType:@encode(MGLTextPitchAlignment)];
}
-- (MGLTextAnchor)MGLTextAnchorValue {
- MGLTextAnchor value;
+- (MGLTextPitchAlignment)MGLTextPitchAlignmentValue {
+ MGLTextPitchAlignment value;
+ [self getValue:&value];
+ return value;
+}
+
++ (NSValue *)valueWithMGLTextRotationAlignment:(MGLTextRotationAlignment)textRotationAlignment {
+ return [NSValue value:&textRotationAlignment withObjCType:@encode(MGLTextRotationAlignment)];
+}
+
+- (MGLTextRotationAlignment)MGLTextRotationAlignmentValue {
+ MGLTextRotationAlignment value;
[self getValue:&value];
return value;
}
@@ -145,22 +145,22 @@ return [NSValue value:&textTranslateAnchor withObjCType:@encode(MGLTextTranslate
return value;
}
-+ (NSValue *)valueWithMGLCircleTranslateAnchor:(MGLCircleTranslateAnchor)circleTranslateAnchor {
-return [NSValue value:&circleTranslateAnchor withObjCType:@encode(MGLCircleTranslateAnchor)];
++ (NSValue *)valueWithMGLCirclePitchScale:(MGLCirclePitchScale)circlePitchScale {
+return [NSValue value:&circlePitchScale withObjCType:@encode(MGLCirclePitchScale)];
}
-- (MGLCircleTranslateAnchor)MGLCircleTranslateAnchorValue {
- MGLCircleTranslateAnchor value;
+- (MGLCirclePitchScale)MGLCirclePitchScaleValue {
+ MGLCirclePitchScale value;
[self getValue:&value];
return value;
}
-+ (NSValue *)valueWithMGLCirclePitchScale:(MGLCirclePitchScale)circlePitchScale {
-return [NSValue value:&circlePitchScale withObjCType:@encode(MGLCirclePitchScale)];
++ (NSValue *)valueWithMGLCircleTranslateAnchor:(MGLCircleTranslateAnchor)circleTranslateAnchor {
+return [NSValue value:&circleTranslateAnchor withObjCType:@encode(MGLCircleTranslateAnchor)];
}
-- (MGLCirclePitchScale)MGLCirclePitchScaleValue {
- MGLCirclePitchScale value;
+- (MGLCircleTranslateAnchor)MGLCircleTranslateAnchorValue {
+ MGLCircleTranslateAnchor value;
[self getValue:&value];
return value;
}
diff --git a/platform/darwin/test/MGLBackgroundStyleLayerTests.m b/platform/darwin/test/MGLBackgroundStyleLayerTests.m
index 2681b773ae..09bed76654 100644
--- a/platform/darwin/test/MGLBackgroundStyleLayerTests.m
+++ b/platform/darwin/test/MGLBackgroundStyleLayerTests.m
@@ -13,22 +13,22 @@
[self.mapView.style addLayer:layer];
layer.backgroundColor = [MGLRuntimeStylingHelper testColor];
- layer.backgroundPattern = [MGLRuntimeStylingHelper testString];
layer.backgroundOpacity = [MGLRuntimeStylingHelper testNumber];
+ layer.backgroundPattern = [MGLRuntimeStylingHelper testString];
MGLBackgroundStyleLayer *gLayer = (MGLBackgroundStyleLayer *)[self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertTrue([gLayer isKindOfClass:[MGLBackgroundStyleLayer class]]);
XCTAssertEqualObjects(gLayer.backgroundColor, [MGLRuntimeStylingHelper testColor]);
- XCTAssertEqualObjects(gLayer.backgroundPattern, [MGLRuntimeStylingHelper testString]);
XCTAssertEqualObjects(gLayer.backgroundOpacity, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.backgroundPattern, [MGLRuntimeStylingHelper testString]);
layer.backgroundColor = [MGLRuntimeStylingHelper testColorFunction];
- layer.backgroundPattern = [MGLRuntimeStylingHelper testStringFunction];
layer.backgroundOpacity = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.backgroundPattern = [MGLRuntimeStylingHelper testStringFunction];
XCTAssertEqualObjects(gLayer.backgroundColor, [MGLRuntimeStylingHelper testColorFunction]);
- XCTAssertEqualObjects(gLayer.backgroundPattern, [MGLRuntimeStylingHelper testStringFunction]);
XCTAssertEqualObjects(gLayer.backgroundOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.backgroundPattern, [MGLRuntimeStylingHelper testStringFunction]);
}
@end
diff --git a/platform/darwin/test/MGLCircleStyleLayerTests.m b/platform/darwin/test/MGLCircleStyleLayerTests.m
index 54ba8be6c1..432d3ffa79 100644
--- a/platform/darwin/test/MGLCircleStyleLayerTests.m
+++ b/platform/darwin/test/MGLCircleStyleLayerTests.m
@@ -16,41 +16,41 @@
MGLCircleStyleLayer *layer = [[MGLCircleStyleLayer alloc] initWithIdentifier:@"layerID" source:source];
[self.mapView.style addLayer:layer];
- layer.circleRadius = [MGLRuntimeStylingHelper testNumber];
- layer.circleColor = [MGLRuntimeStylingHelper testColor];
layer.circleBlur = [MGLRuntimeStylingHelper testNumber];
+ layer.circleColor = [MGLRuntimeStylingHelper testColor];
layer.circleOpacity = [MGLRuntimeStylingHelper testNumber];
+ layer.circlePitchScale = [MGLRuntimeStylingHelper testEnum:MGLCirclePitchScaleViewport type:@encode(MGLCirclePitchScale)];
+ layer.circleRadius = [MGLRuntimeStylingHelper testNumber];
layer.circleTranslate = [MGLRuntimeStylingHelper testOffset];
layer.circleTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLCircleTranslateAnchorViewport type:@encode(MGLCircleTranslateAnchor)];
- layer.circlePitchScale = [MGLRuntimeStylingHelper testEnum:MGLCirclePitchScaleViewport type:@encode(MGLCirclePitchScale)];
MGLCircleStyleLayer *gLayer = (MGLCircleStyleLayer *)[self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertTrue([gLayer isKindOfClass:[MGLCircleStyleLayer class]]);
- XCTAssertEqualObjects(gLayer.circleRadius, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.circleColor, [MGLRuntimeStylingHelper testColor]);
XCTAssertEqualObjects(gLayer.circleBlur, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.circleColor, [MGLRuntimeStylingHelper testColor]);
XCTAssertEqualObjects(gLayer.circleOpacity, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssert([gLayer.circlePitchScale isKindOfClass:[MGLStyleConstantValue class]]);
+ XCTAssertEqualObjects(gLayer.circlePitchScale, [MGLRuntimeStylingHelper testEnum:MGLCirclePitchScaleViewport type:@encode(MGLCirclePitchScale)]);
+ XCTAssertEqualObjects(gLayer.circleRadius, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.circleTranslate, [MGLRuntimeStylingHelper testOffset]);
XCTAssert([gLayer.circleTranslateAnchor isKindOfClass:[MGLStyleConstantValue class]]);
XCTAssertEqualObjects(gLayer.circleTranslateAnchor, [MGLRuntimeStylingHelper testEnum:MGLCircleTranslateAnchorViewport type:@encode(MGLCircleTranslateAnchor)]);
- XCTAssert([gLayer.circlePitchScale isKindOfClass:[MGLStyleConstantValue class]]);
- XCTAssertEqualObjects(gLayer.circlePitchScale, [MGLRuntimeStylingHelper testEnum:MGLCirclePitchScaleViewport type:@encode(MGLCirclePitchScale)]);
- layer.circleRadius = [MGLRuntimeStylingHelper testNumberFunction];
- layer.circleColor = [MGLRuntimeStylingHelper testColorFunction];
layer.circleBlur = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.circleColor = [MGLRuntimeStylingHelper testColorFunction];
layer.circleOpacity = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.circlePitchScale = [MGLRuntimeStylingHelper testEnumFunction:MGLCirclePitchScaleViewport type:@encode(MGLCirclePitchScale)];
+ layer.circleRadius = [MGLRuntimeStylingHelper testNumberFunction];
layer.circleTranslate = [MGLRuntimeStylingHelper testOffsetFunction];
layer.circleTranslateAnchor = [MGLRuntimeStylingHelper testEnumFunction:MGLCircleTranslateAnchorViewport type:@encode(MGLCircleTranslateAnchor)];
- layer.circlePitchScale = [MGLRuntimeStylingHelper testEnumFunction:MGLCirclePitchScaleViewport type:@encode(MGLCirclePitchScale)];
- XCTAssertEqualObjects(gLayer.circleRadius, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.circleColor, [MGLRuntimeStylingHelper testColorFunction]);
XCTAssertEqualObjects(gLayer.circleBlur, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.circleColor, [MGLRuntimeStylingHelper testColorFunction]);
XCTAssertEqualObjects(gLayer.circleOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.circlePitchScale, [MGLRuntimeStylingHelper testEnumFunction:MGLCirclePitchScaleViewport type:@encode(MGLCirclePitchScale)]);
+ XCTAssertEqualObjects(gLayer.circleRadius, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.circleTranslate, [MGLRuntimeStylingHelper testOffsetFunction]);
XCTAssertEqualObjects(gLayer.circleTranslateAnchor, [MGLRuntimeStylingHelper testEnumFunction:MGLCircleTranslateAnchorViewport type:@encode(MGLCircleTranslateAnchor)]);
- XCTAssertEqualObjects(gLayer.circlePitchScale, [MGLRuntimeStylingHelper testEnumFunction:MGLCirclePitchScaleViewport type:@encode(MGLCirclePitchScale)]);
}
@end
diff --git a/platform/darwin/test/MGLFillStyleLayerTests.m b/platform/darwin/test/MGLFillStyleLayerTests.m
index 7b31207902..87846302ea 100644
--- a/platform/darwin/test/MGLFillStyleLayerTests.m
+++ b/platform/darwin/test/MGLFillStyleLayerTests.m
@@ -17,39 +17,39 @@
[self.mapView.style addLayer:layer];
layer.fillAntialias = [MGLRuntimeStylingHelper testBool];
- layer.fillOpacity = [MGLRuntimeStylingHelper testNumber];
layer.fillColor = [MGLRuntimeStylingHelper testColor];
+ layer.fillOpacity = [MGLRuntimeStylingHelper testNumber];
layer.fillOutlineColor = [MGLRuntimeStylingHelper testColor];
+ layer.fillPattern = [MGLRuntimeStylingHelper testString];
layer.fillTranslate = [MGLRuntimeStylingHelper testOffset];
layer.fillTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLFillTranslateAnchorViewport type:@encode(MGLFillTranslateAnchor)];
- layer.fillPattern = [MGLRuntimeStylingHelper testString];
MGLFillStyleLayer *gLayer = (MGLFillStyleLayer *)[self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertTrue([gLayer isKindOfClass:[MGLFillStyleLayer class]]);
XCTAssertEqualObjects(gLayer.fillAntialias, [MGLRuntimeStylingHelper testBool]);
- XCTAssertEqualObjects(gLayer.fillOpacity, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.fillColor, [MGLRuntimeStylingHelper testColor]);
+ XCTAssertEqualObjects(gLayer.fillOpacity, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.fillOutlineColor, [MGLRuntimeStylingHelper testColor]);
+ XCTAssertEqualObjects(gLayer.fillPattern, [MGLRuntimeStylingHelper testString]);
XCTAssertEqualObjects(gLayer.fillTranslate, [MGLRuntimeStylingHelper testOffset]);
XCTAssert([gLayer.fillTranslateAnchor isKindOfClass:[MGLStyleConstantValue class]]);
XCTAssertEqualObjects(gLayer.fillTranslateAnchor, [MGLRuntimeStylingHelper testEnum:MGLFillTranslateAnchorViewport type:@encode(MGLFillTranslateAnchor)]);
- XCTAssertEqualObjects(gLayer.fillPattern, [MGLRuntimeStylingHelper testString]);
layer.fillAntialias = [MGLRuntimeStylingHelper testBoolFunction];
- layer.fillOpacity = [MGLRuntimeStylingHelper testNumberFunction];
layer.fillColor = [MGLRuntimeStylingHelper testColorFunction];
+ layer.fillOpacity = [MGLRuntimeStylingHelper testNumberFunction];
layer.fillOutlineColor = [MGLRuntimeStylingHelper testColorFunction];
+ layer.fillPattern = [MGLRuntimeStylingHelper testStringFunction];
layer.fillTranslate = [MGLRuntimeStylingHelper testOffsetFunction];
layer.fillTranslateAnchor = [MGLRuntimeStylingHelper testEnumFunction:MGLFillTranslateAnchorViewport type:@encode(MGLFillTranslateAnchor)];
- layer.fillPattern = [MGLRuntimeStylingHelper testStringFunction];
XCTAssertEqualObjects(gLayer.fillAntialias, [MGLRuntimeStylingHelper testBoolFunction]);
- XCTAssertEqualObjects(gLayer.fillOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.fillColor, [MGLRuntimeStylingHelper testColorFunction]);
+ XCTAssertEqualObjects(gLayer.fillOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.fillOutlineColor, [MGLRuntimeStylingHelper testColorFunction]);
+ XCTAssertEqualObjects(gLayer.fillPattern, [MGLRuntimeStylingHelper testStringFunction]);
XCTAssertEqualObjects(gLayer.fillTranslate, [MGLRuntimeStylingHelper testOffsetFunction]);
XCTAssertEqualObjects(gLayer.fillTranslateAnchor, [MGLRuntimeStylingHelper testEnumFunction:MGLFillTranslateAnchorViewport type:@encode(MGLFillTranslateAnchor)]);
- XCTAssertEqualObjects(gLayer.fillPattern, [MGLRuntimeStylingHelper testStringFunction]);
}
@end
diff --git a/platform/darwin/test/MGLLineStyleLayerTests.m b/platform/darwin/test/MGLLineStyleLayerTests.m
index 801bc12ff8..95983b1f52 100644
--- a/platform/darwin/test/MGLLineStyleLayerTests.m
+++ b/platform/darwin/test/MGLLineStyleLayerTests.m
@@ -20,16 +20,16 @@
layer.lineJoin = [MGLRuntimeStylingHelper testEnum:MGLLineJoinMiter type:@encode(MGLLineJoin)];
layer.lineMiterLimit = [MGLRuntimeStylingHelper testNumber];
layer.lineRoundLimit = [MGLRuntimeStylingHelper testNumber];
- layer.lineOpacity = [MGLRuntimeStylingHelper testNumber];
+ layer.lineBlur = [MGLRuntimeStylingHelper testNumber];
layer.lineColor = [MGLRuntimeStylingHelper testColor];
- layer.lineTranslate = [MGLRuntimeStylingHelper testOffset];
- layer.lineTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLLineTranslateAnchorViewport type:@encode(MGLLineTranslateAnchor)];
- layer.lineWidth = [MGLRuntimeStylingHelper testNumber];
+ layer.lineDasharray = [MGLRuntimeStylingHelper testDashArray];
layer.lineGapWidth = [MGLRuntimeStylingHelper testNumber];
layer.lineOffset = [MGLRuntimeStylingHelper testNumber];
- layer.lineBlur = [MGLRuntimeStylingHelper testNumber];
- layer.lineDasharray = [MGLRuntimeStylingHelper testDashArray];
+ layer.lineOpacity = [MGLRuntimeStylingHelper testNumber];
layer.linePattern = [MGLRuntimeStylingHelper testString];
+ layer.lineTranslate = [MGLRuntimeStylingHelper testOffset];
+ layer.lineTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLLineTranslateAnchorViewport type:@encode(MGLLineTranslateAnchor)];
+ layer.lineWidth = [MGLRuntimeStylingHelper testNumber];
MGLLineStyleLayer *gLayer = (MGLLineStyleLayer *)[self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertTrue([gLayer isKindOfClass:[MGLLineStyleLayer class]]);
@@ -39,47 +39,47 @@
XCTAssertEqualObjects(gLayer.lineJoin, [MGLRuntimeStylingHelper testEnum:MGLLineJoinMiter type:@encode(MGLLineJoin)]);
XCTAssertEqualObjects(gLayer.lineMiterLimit, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.lineRoundLimit, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.lineOpacity, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.lineBlur, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.lineColor, [MGLRuntimeStylingHelper testColor]);
+ XCTAssertEqualObjects(gLayer.lineDasharray, [MGLRuntimeStylingHelper testDashArray]);
+ XCTAssertEqualObjects(gLayer.lineGapWidth, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.lineOffset, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.lineOpacity, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.linePattern, [MGLRuntimeStylingHelper testString]);
XCTAssertEqualObjects(gLayer.lineTranslate, [MGLRuntimeStylingHelper testOffset]);
XCTAssert([gLayer.lineTranslateAnchor isKindOfClass:[MGLStyleConstantValue class]]);
XCTAssertEqualObjects(gLayer.lineTranslateAnchor, [MGLRuntimeStylingHelper testEnum:MGLLineTranslateAnchorViewport type:@encode(MGLLineTranslateAnchor)]);
XCTAssertEqualObjects(gLayer.lineWidth, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.lineGapWidth, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.lineOffset, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.lineBlur, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.lineDasharray, [MGLRuntimeStylingHelper testDashArray]);
- XCTAssertEqualObjects(gLayer.linePattern, [MGLRuntimeStylingHelper testString]);
layer.lineCap = [MGLRuntimeStylingHelper testEnumFunction:MGLLineCapSquare type:@encode(MGLLineCap)];
layer.lineJoin = [MGLRuntimeStylingHelper testEnumFunction:MGLLineJoinMiter type:@encode(MGLLineJoin)];
layer.lineMiterLimit = [MGLRuntimeStylingHelper testNumberFunction];
layer.lineRoundLimit = [MGLRuntimeStylingHelper testNumberFunction];
- layer.lineOpacity = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.lineBlur = [MGLRuntimeStylingHelper testNumberFunction];
layer.lineColor = [MGLRuntimeStylingHelper testColorFunction];
- layer.lineTranslate = [MGLRuntimeStylingHelper testOffsetFunction];
- layer.lineTranslateAnchor = [MGLRuntimeStylingHelper testEnumFunction:MGLLineTranslateAnchorViewport type:@encode(MGLLineTranslateAnchor)];
- layer.lineWidth = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.lineDasharray = [MGLRuntimeStylingHelper testDashArrayFunction];
layer.lineGapWidth = [MGLRuntimeStylingHelper testNumberFunction];
layer.lineOffset = [MGLRuntimeStylingHelper testNumberFunction];
- layer.lineBlur = [MGLRuntimeStylingHelper testNumberFunction];
- layer.lineDasharray = [MGLRuntimeStylingHelper testDashArrayFunction];
+ layer.lineOpacity = [MGLRuntimeStylingHelper testNumberFunction];
layer.linePattern = [MGLRuntimeStylingHelper testStringFunction];
+ layer.lineTranslate = [MGLRuntimeStylingHelper testOffsetFunction];
+ layer.lineTranslateAnchor = [MGLRuntimeStylingHelper testEnumFunction:MGLLineTranslateAnchorViewport type:@encode(MGLLineTranslateAnchor)];
+ layer.lineWidth = [MGLRuntimeStylingHelper testNumberFunction];
XCTAssertEqualObjects(gLayer.lineCap, [MGLRuntimeStylingHelper testEnumFunction:MGLLineCapSquare type:@encode(MGLLineCap)]);
XCTAssertEqualObjects(gLayer.lineJoin, [MGLRuntimeStylingHelper testEnumFunction:MGLLineJoinMiter type:@encode(MGLLineJoin)]);
XCTAssertEqualObjects(gLayer.lineMiterLimit, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.lineRoundLimit, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.lineOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.lineBlur, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.lineColor, [MGLRuntimeStylingHelper testColorFunction]);
- XCTAssertEqualObjects(gLayer.lineTranslate, [MGLRuntimeStylingHelper testOffsetFunction]);
- XCTAssertEqualObjects(gLayer.lineTranslateAnchor, [MGLRuntimeStylingHelper testEnumFunction:MGLLineTranslateAnchorViewport type:@encode(MGLLineTranslateAnchor)]);
- XCTAssertEqualObjects(gLayer.lineWidth, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.lineDasharray, [MGLRuntimeStylingHelper testDashArrayFunction]);
XCTAssertEqualObjects(gLayer.lineGapWidth, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.lineOffset, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.lineBlur, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.lineDasharray, [MGLRuntimeStylingHelper testDashArrayFunction]);
+ XCTAssertEqualObjects(gLayer.lineOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.linePattern, [MGLRuntimeStylingHelper testStringFunction]);
+ XCTAssertEqualObjects(gLayer.lineTranslate, [MGLRuntimeStylingHelper testOffsetFunction]);
+ XCTAssertEqualObjects(gLayer.lineTranslateAnchor, [MGLRuntimeStylingHelper testEnumFunction:MGLLineTranslateAnchorViewport type:@encode(MGLLineTranslateAnchor)]);
+ XCTAssertEqualObjects(gLayer.lineWidth, [MGLRuntimeStylingHelper testNumberFunction]);
}
@end
diff --git a/platform/darwin/test/MGLRasterStyleLayerTests.m b/platform/darwin/test/MGLRasterStyleLayerTests.m
index f68f6d3283..84fd0fe3e5 100644
--- a/platform/darwin/test/MGLRasterStyleLayerTests.m
+++ b/platform/darwin/test/MGLRasterStyleLayerTests.m
@@ -16,39 +16,39 @@
MGLRasterStyleLayer *layer = [[MGLRasterStyleLayer alloc] initWithIdentifier:@"layerID" source:source];
[self.mapView.style addLayer:layer];
- layer.rasterOpacity = [MGLRuntimeStylingHelper testNumber];
- layer.rasterHueRotate = [MGLRuntimeStylingHelper testNumber];
- layer.rasterBrightnessMin = [MGLRuntimeStylingHelper testNumber];
- layer.rasterBrightnessMax = [MGLRuntimeStylingHelper testNumber];
- layer.rasterSaturation = [MGLRuntimeStylingHelper testNumber];
+ layer.maximumRasterBrightness = [MGLRuntimeStylingHelper testNumber];
+ layer.minimumRasterBrightness = [MGLRuntimeStylingHelper testNumber];
layer.rasterContrast = [MGLRuntimeStylingHelper testNumber];
layer.rasterFadeDuration = [MGLRuntimeStylingHelper testNumber];
+ layer.rasterHueRotate = [MGLRuntimeStylingHelper testNumber];
+ layer.rasterOpacity = [MGLRuntimeStylingHelper testNumber];
+ layer.rasterSaturation = [MGLRuntimeStylingHelper testNumber];
MGLRasterStyleLayer *gLayer = (MGLRasterStyleLayer *)[self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertTrue([gLayer isKindOfClass:[MGLRasterStyleLayer class]]);
- XCTAssertEqualObjects(gLayer.rasterOpacity, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.rasterHueRotate, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.rasterBrightnessMin, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.rasterBrightnessMax, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.rasterSaturation, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.maximumRasterBrightness, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.minimumRasterBrightness, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.rasterContrast, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.rasterFadeDuration, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.rasterHueRotate, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.rasterOpacity, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.rasterSaturation, [MGLRuntimeStylingHelper testNumber]);
- layer.rasterOpacity = [MGLRuntimeStylingHelper testNumberFunction];
- layer.rasterHueRotate = [MGLRuntimeStylingHelper testNumberFunction];
- layer.rasterBrightnessMin = [MGLRuntimeStylingHelper testNumberFunction];
- layer.rasterBrightnessMax = [MGLRuntimeStylingHelper testNumberFunction];
- layer.rasterSaturation = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.maximumRasterBrightness = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.minimumRasterBrightness = [MGLRuntimeStylingHelper testNumberFunction];
layer.rasterContrast = [MGLRuntimeStylingHelper testNumberFunction];
layer.rasterFadeDuration = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.rasterHueRotate = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.rasterOpacity = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.rasterSaturation = [MGLRuntimeStylingHelper testNumberFunction];
- XCTAssertEqualObjects(gLayer.rasterOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.rasterHueRotate, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.rasterBrightnessMin, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.rasterBrightnessMax, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.rasterSaturation, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.maximumRasterBrightness, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.minimumRasterBrightness, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.rasterContrast, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.rasterFadeDuration, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.rasterHueRotate, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.rasterOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.rasterSaturation, [MGLRuntimeStylingHelper testNumberFunction]);
}
@end
diff --git a/platform/darwin/test/MGLSymbolStyleLayerTests.m b/platform/darwin/test/MGLSymbolStyleLayerTests.m
index f60ae7c2a8..e77c4f6f39 100644
--- a/platform/darwin/test/MGLSymbolStyleLayerTests.m
+++ b/platform/darwin/test/MGLSymbolStyleLayerTests.m
@@ -16,211 +16,211 @@
MGLSymbolStyleLayer *layer = [[MGLSymbolStyleLayer alloc] initWithIdentifier:@"layerID" source:source];
[self.mapView.style addLayer:layer];
- layer.symbolPlacement = [MGLRuntimeStylingHelper testEnum:MGLSymbolPlacementLine type:@encode(MGLSymbolPlacement)];
- layer.symbolSpacing = [MGLRuntimeStylingHelper testNumber];
- layer.symbolAvoidEdges = [MGLRuntimeStylingHelper testBool];
layer.iconAllowOverlap = [MGLRuntimeStylingHelper testBool];
layer.iconIgnorePlacement = [MGLRuntimeStylingHelper testBool];
+ layer.iconImageName = [MGLRuntimeStylingHelper testString];
+ layer.iconKeepUpright = [MGLRuntimeStylingHelper testBool];
+ layer.iconOffset = [MGLRuntimeStylingHelper testOffset];
layer.iconOptional = [MGLRuntimeStylingHelper testBool];
+ layer.iconPadding = [MGLRuntimeStylingHelper testNumber];
+ layer.iconRotate = [MGLRuntimeStylingHelper testNumber];
layer.iconRotationAlignment = [MGLRuntimeStylingHelper testEnum:MGLIconRotationAlignmentAuto type:@encode(MGLIconRotationAlignment)];
layer.iconSize = [MGLRuntimeStylingHelper testNumber];
layer.iconTextFit = [MGLRuntimeStylingHelper testEnum:MGLIconTextFitBoth type:@encode(MGLIconTextFit)];
layer.iconTextFitPadding = [MGLRuntimeStylingHelper testPadding];
- layer.iconImage = [MGLRuntimeStylingHelper testString];
- layer.iconRotate = [MGLRuntimeStylingHelper testNumber];
- layer.iconPadding = [MGLRuntimeStylingHelper testNumber];
- layer.iconKeepUpright = [MGLRuntimeStylingHelper testBool];
- layer.iconOffset = [MGLRuntimeStylingHelper testOffset];
- layer.textPitchAlignment = [MGLRuntimeStylingHelper testEnum:MGLTextPitchAlignmentAuto type:@encode(MGLTextPitchAlignment)];
- layer.textRotationAlignment = [MGLRuntimeStylingHelper testEnum:MGLTextRotationAlignmentAuto type:@encode(MGLTextRotationAlignment)];
+ layer.symbolAvoidEdges = [MGLRuntimeStylingHelper testBool];
+ layer.symbolPlacement = [MGLRuntimeStylingHelper testEnum:MGLSymbolPlacementLine type:@encode(MGLSymbolPlacement)];
+ layer.symbolSpacing = [MGLRuntimeStylingHelper testNumber];
+ layer.textAllowOverlap = [MGLRuntimeStylingHelper testBool];
+ layer.textAnchor = [MGLRuntimeStylingHelper testEnum:MGLTextAnchorBottomRight type:@encode(MGLTextAnchor)];
layer.textField = [MGLRuntimeStylingHelper testString];
layer.textFont = [MGLRuntimeStylingHelper testFont];
- layer.textSize = [MGLRuntimeStylingHelper testNumber];
- layer.textMaxWidth = [MGLRuntimeStylingHelper testNumber];
- layer.textLineHeight = [MGLRuntimeStylingHelper testNumber];
- layer.textLetterSpacing = [MGLRuntimeStylingHelper testNumber];
+ layer.textIgnorePlacement = [MGLRuntimeStylingHelper testBool];
layer.textJustify = [MGLRuntimeStylingHelper testEnum:MGLTextJustifyRight type:@encode(MGLTextJustify)];
- layer.textAnchor = [MGLRuntimeStylingHelper testEnum:MGLTextAnchorBottomRight type:@encode(MGLTextAnchor)];
- layer.textMaxAngle = [MGLRuntimeStylingHelper testNumber];
- layer.textRotate = [MGLRuntimeStylingHelper testNumber];
- layer.textPadding = [MGLRuntimeStylingHelper testNumber];
layer.textKeepUpright = [MGLRuntimeStylingHelper testBool];
- layer.textTransform = [MGLRuntimeStylingHelper testEnum:MGLTextTransformLowercase type:@encode(MGLTextTransform)];
+ layer.textLetterSpacing = [MGLRuntimeStylingHelper testNumber];
+ layer.textLineHeight = [MGLRuntimeStylingHelper testNumber];
+ layer.textMaxAngle = [MGLRuntimeStylingHelper testNumber];
+ layer.textMaxWidth = [MGLRuntimeStylingHelper testNumber];
layer.textOffset = [MGLRuntimeStylingHelper testOffset];
- layer.textAllowOverlap = [MGLRuntimeStylingHelper testBool];
- layer.textIgnorePlacement = [MGLRuntimeStylingHelper testBool];
layer.textOptional = [MGLRuntimeStylingHelper testBool];
- layer.iconOpacity = [MGLRuntimeStylingHelper testNumber];
+ layer.textPadding = [MGLRuntimeStylingHelper testNumber];
+ layer.textPitchAlignment = [MGLRuntimeStylingHelper testEnum:MGLTextPitchAlignmentAuto type:@encode(MGLTextPitchAlignment)];
+ layer.textRotate = [MGLRuntimeStylingHelper testNumber];
+ layer.textRotationAlignment = [MGLRuntimeStylingHelper testEnum:MGLTextRotationAlignmentAuto type:@encode(MGLTextRotationAlignment)];
+ layer.textSize = [MGLRuntimeStylingHelper testNumber];
+ layer.textTransform = [MGLRuntimeStylingHelper testEnum:MGLTextTransformLowercase type:@encode(MGLTextTransform)];
layer.iconColor = [MGLRuntimeStylingHelper testColor];
+ layer.iconHaloBlur = [MGLRuntimeStylingHelper testNumber];
layer.iconHaloColor = [MGLRuntimeStylingHelper testColor];
layer.iconHaloWidth = [MGLRuntimeStylingHelper testNumber];
- layer.iconHaloBlur = [MGLRuntimeStylingHelper testNumber];
+ layer.iconOpacity = [MGLRuntimeStylingHelper testNumber];
layer.iconTranslate = [MGLRuntimeStylingHelper testOffset];
layer.iconTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLIconTranslateAnchorViewport type:@encode(MGLIconTranslateAnchor)];
- layer.textOpacity = [MGLRuntimeStylingHelper testNumber];
layer.textColor = [MGLRuntimeStylingHelper testColor];
+ layer.textHaloBlur = [MGLRuntimeStylingHelper testNumber];
layer.textHaloColor = [MGLRuntimeStylingHelper testColor];
layer.textHaloWidth = [MGLRuntimeStylingHelper testNumber];
- layer.textHaloBlur = [MGLRuntimeStylingHelper testNumber];
+ layer.textOpacity = [MGLRuntimeStylingHelper testNumber];
layer.textTranslate = [MGLRuntimeStylingHelper testOffset];
layer.textTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLTextTranslateAnchorViewport type:@encode(MGLTextTranslateAnchor)];
MGLSymbolStyleLayer *gLayer = (MGLSymbolStyleLayer *)[self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertTrue([gLayer isKindOfClass:[MGLSymbolStyleLayer class]]);
- XCTAssert([gLayer.symbolPlacement isKindOfClass:[MGLStyleConstantValue class]]);
- XCTAssertEqualObjects(gLayer.symbolPlacement, [MGLRuntimeStylingHelper testEnum:MGLSymbolPlacementLine type:@encode(MGLSymbolPlacement)]);
- XCTAssertEqualObjects(gLayer.symbolSpacing, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.symbolAvoidEdges, [MGLRuntimeStylingHelper testBool]);
XCTAssertEqualObjects(gLayer.iconAllowOverlap, [MGLRuntimeStylingHelper testBool]);
XCTAssertEqualObjects(gLayer.iconIgnorePlacement, [MGLRuntimeStylingHelper testBool]);
+ XCTAssertEqualObjects(gLayer.iconImageName, [MGLRuntimeStylingHelper testString]);
+ XCTAssertEqualObjects(gLayer.iconKeepUpright, [MGLRuntimeStylingHelper testBool]);
+ XCTAssertEqualObjects(gLayer.iconOffset, [MGLRuntimeStylingHelper testOffset]);
XCTAssertEqualObjects(gLayer.iconOptional, [MGLRuntimeStylingHelper testBool]);
+ XCTAssertEqualObjects(gLayer.iconPadding, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.iconRotate, [MGLRuntimeStylingHelper testNumber]);
XCTAssert([gLayer.iconRotationAlignment isKindOfClass:[MGLStyleConstantValue class]]);
XCTAssertEqualObjects(gLayer.iconRotationAlignment, [MGLRuntimeStylingHelper testEnum:MGLIconRotationAlignmentAuto type:@encode(MGLIconRotationAlignment)]);
XCTAssertEqualObjects(gLayer.iconSize, [MGLRuntimeStylingHelper testNumber]);
XCTAssert([gLayer.iconTextFit isKindOfClass:[MGLStyleConstantValue class]]);
XCTAssertEqualObjects(gLayer.iconTextFit, [MGLRuntimeStylingHelper testEnum:MGLIconTextFitBoth type:@encode(MGLIconTextFit)]);
XCTAssertEqualObjects(gLayer.iconTextFitPadding, [MGLRuntimeStylingHelper testPadding]);
- XCTAssertEqualObjects(gLayer.iconImage, [MGLRuntimeStylingHelper testString]);
- XCTAssertEqualObjects(gLayer.iconRotate, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.iconPadding, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.iconKeepUpright, [MGLRuntimeStylingHelper testBool]);
- XCTAssertEqualObjects(gLayer.iconOffset, [MGLRuntimeStylingHelper testOffset]);
- XCTAssert([gLayer.textPitchAlignment isKindOfClass:[MGLStyleConstantValue class]]);
- XCTAssertEqualObjects(gLayer.textPitchAlignment, [MGLRuntimeStylingHelper testEnum:MGLTextPitchAlignmentAuto type:@encode(MGLTextPitchAlignment)]);
- XCTAssert([gLayer.textRotationAlignment isKindOfClass:[MGLStyleConstantValue class]]);
- XCTAssertEqualObjects(gLayer.textRotationAlignment, [MGLRuntimeStylingHelper testEnum:MGLTextRotationAlignmentAuto type:@encode(MGLTextRotationAlignment)]);
+ XCTAssertEqualObjects(gLayer.symbolAvoidEdges, [MGLRuntimeStylingHelper testBool]);
+ XCTAssert([gLayer.symbolPlacement isKindOfClass:[MGLStyleConstantValue class]]);
+ XCTAssertEqualObjects(gLayer.symbolPlacement, [MGLRuntimeStylingHelper testEnum:MGLSymbolPlacementLine type:@encode(MGLSymbolPlacement)]);
+ XCTAssertEqualObjects(gLayer.symbolSpacing, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.textAllowOverlap, [MGLRuntimeStylingHelper testBool]);
+ XCTAssert([gLayer.textAnchor isKindOfClass:[MGLStyleConstantValue class]]);
+ XCTAssertEqualObjects(gLayer.textAnchor, [MGLRuntimeStylingHelper testEnum:MGLTextAnchorBottomRight type:@encode(MGLTextAnchor)]);
XCTAssertEqualObjects(gLayer.textField, [MGLRuntimeStylingHelper testString]);
XCTAssertEqualObjects(gLayer.textFont, [MGLRuntimeStylingHelper testFont]);
- XCTAssertEqualObjects(gLayer.textSize, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.textMaxWidth, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.textLineHeight, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.textLetterSpacing, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.textIgnorePlacement, [MGLRuntimeStylingHelper testBool]);
XCTAssert([gLayer.textJustify isKindOfClass:[MGLStyleConstantValue class]]);
XCTAssertEqualObjects(gLayer.textJustify, [MGLRuntimeStylingHelper testEnum:MGLTextJustifyRight type:@encode(MGLTextJustify)]);
- XCTAssert([gLayer.textAnchor isKindOfClass:[MGLStyleConstantValue class]]);
- XCTAssertEqualObjects(gLayer.textAnchor, [MGLRuntimeStylingHelper testEnum:MGLTextAnchorBottomRight type:@encode(MGLTextAnchor)]);
+ XCTAssertEqualObjects(gLayer.textKeepUpright, [MGLRuntimeStylingHelper testBool]);
+ XCTAssertEqualObjects(gLayer.textLetterSpacing, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.textLineHeight, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.textMaxAngle, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.textRotate, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.textMaxWidth, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.textOffset, [MGLRuntimeStylingHelper testOffset]);
+ XCTAssertEqualObjects(gLayer.textOptional, [MGLRuntimeStylingHelper testBool]);
XCTAssertEqualObjects(gLayer.textPadding, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.textKeepUpright, [MGLRuntimeStylingHelper testBool]);
+ XCTAssert([gLayer.textPitchAlignment isKindOfClass:[MGLStyleConstantValue class]]);
+ XCTAssertEqualObjects(gLayer.textPitchAlignment, [MGLRuntimeStylingHelper testEnum:MGLTextPitchAlignmentAuto type:@encode(MGLTextPitchAlignment)]);
+ XCTAssertEqualObjects(gLayer.textRotate, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssert([gLayer.textRotationAlignment isKindOfClass:[MGLStyleConstantValue class]]);
+ XCTAssertEqualObjects(gLayer.textRotationAlignment, [MGLRuntimeStylingHelper testEnum:MGLTextRotationAlignmentAuto type:@encode(MGLTextRotationAlignment)]);
+ XCTAssertEqualObjects(gLayer.textSize, [MGLRuntimeStylingHelper testNumber]);
XCTAssert([gLayer.textTransform isKindOfClass:[MGLStyleConstantValue class]]);
XCTAssertEqualObjects(gLayer.textTransform, [MGLRuntimeStylingHelper testEnum:MGLTextTransformLowercase type:@encode(MGLTextTransform)]);
- XCTAssertEqualObjects(gLayer.textOffset, [MGLRuntimeStylingHelper testOffset]);
- XCTAssertEqualObjects(gLayer.textAllowOverlap, [MGLRuntimeStylingHelper testBool]);
- XCTAssertEqualObjects(gLayer.textIgnorePlacement, [MGLRuntimeStylingHelper testBool]);
- XCTAssertEqualObjects(gLayer.textOptional, [MGLRuntimeStylingHelper testBool]);
- XCTAssertEqualObjects(gLayer.iconOpacity, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.iconColor, [MGLRuntimeStylingHelper testColor]);
+ XCTAssertEqualObjects(gLayer.iconHaloBlur, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.iconHaloColor, [MGLRuntimeStylingHelper testColor]);
XCTAssertEqualObjects(gLayer.iconHaloWidth, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.iconHaloBlur, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.iconOpacity, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.iconTranslate, [MGLRuntimeStylingHelper testOffset]);
XCTAssert([gLayer.iconTranslateAnchor isKindOfClass:[MGLStyleConstantValue class]]);
XCTAssertEqualObjects(gLayer.iconTranslateAnchor, [MGLRuntimeStylingHelper testEnum:MGLIconTranslateAnchorViewport type:@encode(MGLIconTranslateAnchor)]);
- XCTAssertEqualObjects(gLayer.textOpacity, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.textColor, [MGLRuntimeStylingHelper testColor]);
+ XCTAssertEqualObjects(gLayer.textHaloBlur, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.textHaloColor, [MGLRuntimeStylingHelper testColor]);
XCTAssertEqualObjects(gLayer.textHaloWidth, [MGLRuntimeStylingHelper testNumber]);
- XCTAssertEqualObjects(gLayer.textHaloBlur, [MGLRuntimeStylingHelper testNumber]);
+ XCTAssertEqualObjects(gLayer.textOpacity, [MGLRuntimeStylingHelper testNumber]);
XCTAssertEqualObjects(gLayer.textTranslate, [MGLRuntimeStylingHelper testOffset]);
XCTAssert([gLayer.textTranslateAnchor isKindOfClass:[MGLStyleConstantValue class]]);
XCTAssertEqualObjects(gLayer.textTranslateAnchor, [MGLRuntimeStylingHelper testEnum:MGLTextTranslateAnchorViewport type:@encode(MGLTextTranslateAnchor)]);
- layer.symbolPlacement = [MGLRuntimeStylingHelper testEnumFunction:MGLSymbolPlacementLine type:@encode(MGLSymbolPlacement)];
- layer.symbolSpacing = [MGLRuntimeStylingHelper testNumberFunction];
- layer.symbolAvoidEdges = [MGLRuntimeStylingHelper testBoolFunction];
layer.iconAllowOverlap = [MGLRuntimeStylingHelper testBoolFunction];
layer.iconIgnorePlacement = [MGLRuntimeStylingHelper testBoolFunction];
+ layer.iconImageName = [MGLRuntimeStylingHelper testStringFunction];
+ layer.iconKeepUpright = [MGLRuntimeStylingHelper testBoolFunction];
+ layer.iconOffset = [MGLRuntimeStylingHelper testOffsetFunction];
layer.iconOptional = [MGLRuntimeStylingHelper testBoolFunction];
+ layer.iconPadding = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.iconRotate = [MGLRuntimeStylingHelper testNumberFunction];
layer.iconRotationAlignment = [MGLRuntimeStylingHelper testEnumFunction:MGLIconRotationAlignmentAuto type:@encode(MGLIconRotationAlignment)];
layer.iconSize = [MGLRuntimeStylingHelper testNumberFunction];
layer.iconTextFit = [MGLRuntimeStylingHelper testEnumFunction:MGLIconTextFitBoth type:@encode(MGLIconTextFit)];
layer.iconTextFitPadding = [MGLRuntimeStylingHelper testPaddingFunction];
- layer.iconImage = [MGLRuntimeStylingHelper testStringFunction];
- layer.iconRotate = [MGLRuntimeStylingHelper testNumberFunction];
- layer.iconPadding = [MGLRuntimeStylingHelper testNumberFunction];
- layer.iconKeepUpright = [MGLRuntimeStylingHelper testBoolFunction];
- layer.iconOffset = [MGLRuntimeStylingHelper testOffsetFunction];
- layer.textPitchAlignment = [MGLRuntimeStylingHelper testEnumFunction:MGLTextPitchAlignmentAuto type:@encode(MGLTextPitchAlignment)];
- layer.textRotationAlignment = [MGLRuntimeStylingHelper testEnumFunction:MGLTextRotationAlignmentAuto type:@encode(MGLTextRotationAlignment)];
+ layer.symbolAvoidEdges = [MGLRuntimeStylingHelper testBoolFunction];
+ layer.symbolPlacement = [MGLRuntimeStylingHelper testEnumFunction:MGLSymbolPlacementLine type:@encode(MGLSymbolPlacement)];
+ layer.symbolSpacing = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.textAllowOverlap = [MGLRuntimeStylingHelper testBoolFunction];
+ layer.textAnchor = [MGLRuntimeStylingHelper testEnumFunction:MGLTextAnchorBottomRight type:@encode(MGLTextAnchor)];
layer.textField = [MGLRuntimeStylingHelper testStringFunction];
layer.textFont = [MGLRuntimeStylingHelper testFontFunction];
- layer.textSize = [MGLRuntimeStylingHelper testNumberFunction];
- layer.textMaxWidth = [MGLRuntimeStylingHelper testNumberFunction];
- layer.textLineHeight = [MGLRuntimeStylingHelper testNumberFunction];
- layer.textLetterSpacing = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.textIgnorePlacement = [MGLRuntimeStylingHelper testBoolFunction];
layer.textJustify = [MGLRuntimeStylingHelper testEnumFunction:MGLTextJustifyRight type:@encode(MGLTextJustify)];
- layer.textAnchor = [MGLRuntimeStylingHelper testEnumFunction:MGLTextAnchorBottomRight type:@encode(MGLTextAnchor)];
- layer.textMaxAngle = [MGLRuntimeStylingHelper testNumberFunction];
- layer.textRotate = [MGLRuntimeStylingHelper testNumberFunction];
- layer.textPadding = [MGLRuntimeStylingHelper testNumberFunction];
layer.textKeepUpright = [MGLRuntimeStylingHelper testBoolFunction];
- layer.textTransform = [MGLRuntimeStylingHelper testEnumFunction:MGLTextTransformLowercase type:@encode(MGLTextTransform)];
+ layer.textLetterSpacing = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.textLineHeight = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.textMaxAngle = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.textMaxWidth = [MGLRuntimeStylingHelper testNumberFunction];
layer.textOffset = [MGLRuntimeStylingHelper testOffsetFunction];
- layer.textAllowOverlap = [MGLRuntimeStylingHelper testBoolFunction];
- layer.textIgnorePlacement = [MGLRuntimeStylingHelper testBoolFunction];
layer.textOptional = [MGLRuntimeStylingHelper testBoolFunction];
- layer.iconOpacity = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.textPadding = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.textPitchAlignment = [MGLRuntimeStylingHelper testEnumFunction:MGLTextPitchAlignmentAuto type:@encode(MGLTextPitchAlignment)];
+ layer.textRotate = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.textRotationAlignment = [MGLRuntimeStylingHelper testEnumFunction:MGLTextRotationAlignmentAuto type:@encode(MGLTextRotationAlignment)];
+ layer.textSize = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.textTransform = [MGLRuntimeStylingHelper testEnumFunction:MGLTextTransformLowercase type:@encode(MGLTextTransform)];
layer.iconColor = [MGLRuntimeStylingHelper testColorFunction];
+ layer.iconHaloBlur = [MGLRuntimeStylingHelper testNumberFunction];
layer.iconHaloColor = [MGLRuntimeStylingHelper testColorFunction];
layer.iconHaloWidth = [MGLRuntimeStylingHelper testNumberFunction];
- layer.iconHaloBlur = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.iconOpacity = [MGLRuntimeStylingHelper testNumberFunction];
layer.iconTranslate = [MGLRuntimeStylingHelper testOffsetFunction];
layer.iconTranslateAnchor = [MGLRuntimeStylingHelper testEnumFunction:MGLIconTranslateAnchorViewport type:@encode(MGLIconTranslateAnchor)];
- layer.textOpacity = [MGLRuntimeStylingHelper testNumberFunction];
layer.textColor = [MGLRuntimeStylingHelper testColorFunction];
+ layer.textHaloBlur = [MGLRuntimeStylingHelper testNumberFunction];
layer.textHaloColor = [MGLRuntimeStylingHelper testColorFunction];
layer.textHaloWidth = [MGLRuntimeStylingHelper testNumberFunction];
- layer.textHaloBlur = [MGLRuntimeStylingHelper testNumberFunction];
+ layer.textOpacity = [MGLRuntimeStylingHelper testNumberFunction];
layer.textTranslate = [MGLRuntimeStylingHelper testOffsetFunction];
layer.textTranslateAnchor = [MGLRuntimeStylingHelper testEnumFunction:MGLTextTranslateAnchorViewport type:@encode(MGLTextTranslateAnchor)];
- XCTAssertEqualObjects(gLayer.symbolPlacement, [MGLRuntimeStylingHelper testEnumFunction:MGLSymbolPlacementLine type:@encode(MGLSymbolPlacement)]);
- XCTAssertEqualObjects(gLayer.symbolSpacing, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.symbolAvoidEdges, [MGLRuntimeStylingHelper testBoolFunction]);
XCTAssertEqualObjects(gLayer.iconAllowOverlap, [MGLRuntimeStylingHelper testBoolFunction]);
XCTAssertEqualObjects(gLayer.iconIgnorePlacement, [MGLRuntimeStylingHelper testBoolFunction]);
+ XCTAssertEqualObjects(gLayer.iconImageName, [MGLRuntimeStylingHelper testStringFunction]);
+ XCTAssertEqualObjects(gLayer.iconKeepUpright, [MGLRuntimeStylingHelper testBoolFunction]);
+ XCTAssertEqualObjects(gLayer.iconOffset, [MGLRuntimeStylingHelper testOffsetFunction]);
XCTAssertEqualObjects(gLayer.iconOptional, [MGLRuntimeStylingHelper testBoolFunction]);
+ XCTAssertEqualObjects(gLayer.iconPadding, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.iconRotate, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.iconRotationAlignment, [MGLRuntimeStylingHelper testEnumFunction:MGLIconRotationAlignmentAuto type:@encode(MGLIconRotationAlignment)]);
XCTAssertEqualObjects(gLayer.iconSize, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.iconTextFit, [MGLRuntimeStylingHelper testEnumFunction:MGLIconTextFitBoth type:@encode(MGLIconTextFit)]);
XCTAssertEqualObjects(gLayer.iconTextFitPadding, [MGLRuntimeStylingHelper testPaddingFunction]);
- XCTAssertEqualObjects(gLayer.iconImage, [MGLRuntimeStylingHelper testStringFunction]);
- XCTAssertEqualObjects(gLayer.iconRotate, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.iconPadding, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.iconKeepUpright, [MGLRuntimeStylingHelper testBoolFunction]);
- XCTAssertEqualObjects(gLayer.iconOffset, [MGLRuntimeStylingHelper testOffsetFunction]);
- XCTAssertEqualObjects(gLayer.textPitchAlignment, [MGLRuntimeStylingHelper testEnumFunction:MGLTextPitchAlignmentAuto type:@encode(MGLTextPitchAlignment)]);
- XCTAssertEqualObjects(gLayer.textRotationAlignment, [MGLRuntimeStylingHelper testEnumFunction:MGLTextRotationAlignmentAuto type:@encode(MGLTextRotationAlignment)]);
+ XCTAssertEqualObjects(gLayer.symbolAvoidEdges, [MGLRuntimeStylingHelper testBoolFunction]);
+ XCTAssertEqualObjects(gLayer.symbolPlacement, [MGLRuntimeStylingHelper testEnumFunction:MGLSymbolPlacementLine type:@encode(MGLSymbolPlacement)]);
+ XCTAssertEqualObjects(gLayer.symbolSpacing, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.textAllowOverlap, [MGLRuntimeStylingHelper testBoolFunction]);
+ XCTAssertEqualObjects(gLayer.textAnchor, [MGLRuntimeStylingHelper testEnumFunction:MGLTextAnchorBottomRight type:@encode(MGLTextAnchor)]);
XCTAssertEqualObjects(gLayer.textField, [MGLRuntimeStylingHelper testStringFunction]);
XCTAssertEqualObjects(gLayer.textFont, [MGLRuntimeStylingHelper testFontFunction]);
- XCTAssertEqualObjects(gLayer.textSize, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.textMaxWidth, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.textLineHeight, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.textLetterSpacing, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.textIgnorePlacement, [MGLRuntimeStylingHelper testBoolFunction]);
XCTAssertEqualObjects(gLayer.textJustify, [MGLRuntimeStylingHelper testEnumFunction:MGLTextJustifyRight type:@encode(MGLTextJustify)]);
- XCTAssertEqualObjects(gLayer.textAnchor, [MGLRuntimeStylingHelper testEnumFunction:MGLTextAnchorBottomRight type:@encode(MGLTextAnchor)]);
- XCTAssertEqualObjects(gLayer.textMaxAngle, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.textRotate, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.textPadding, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.textKeepUpright, [MGLRuntimeStylingHelper testBoolFunction]);
- XCTAssertEqualObjects(gLayer.textTransform, [MGLRuntimeStylingHelper testEnumFunction:MGLTextTransformLowercase type:@encode(MGLTextTransform)]);
+ XCTAssertEqualObjects(gLayer.textLetterSpacing, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.textLineHeight, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.textMaxAngle, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.textMaxWidth, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.textOffset, [MGLRuntimeStylingHelper testOffsetFunction]);
- XCTAssertEqualObjects(gLayer.textAllowOverlap, [MGLRuntimeStylingHelper testBoolFunction]);
- XCTAssertEqualObjects(gLayer.textIgnorePlacement, [MGLRuntimeStylingHelper testBoolFunction]);
XCTAssertEqualObjects(gLayer.textOptional, [MGLRuntimeStylingHelper testBoolFunction]);
- XCTAssertEqualObjects(gLayer.iconOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.textPadding, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.textPitchAlignment, [MGLRuntimeStylingHelper testEnumFunction:MGLTextPitchAlignmentAuto type:@encode(MGLTextPitchAlignment)]);
+ XCTAssertEqualObjects(gLayer.textRotate, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.textRotationAlignment, [MGLRuntimeStylingHelper testEnumFunction:MGLTextRotationAlignmentAuto type:@encode(MGLTextRotationAlignment)]);
+ XCTAssertEqualObjects(gLayer.textSize, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.textTransform, [MGLRuntimeStylingHelper testEnumFunction:MGLTextTransformLowercase type:@encode(MGLTextTransform)]);
XCTAssertEqualObjects(gLayer.iconColor, [MGLRuntimeStylingHelper testColorFunction]);
+ XCTAssertEqualObjects(gLayer.iconHaloBlur, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.iconHaloColor, [MGLRuntimeStylingHelper testColorFunction]);
XCTAssertEqualObjects(gLayer.iconHaloWidth, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.iconHaloBlur, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.iconOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.iconTranslate, [MGLRuntimeStylingHelper testOffsetFunction]);
XCTAssertEqualObjects(gLayer.iconTranslateAnchor, [MGLRuntimeStylingHelper testEnumFunction:MGLIconTranslateAnchorViewport type:@encode(MGLIconTranslateAnchor)]);
- XCTAssertEqualObjects(gLayer.textOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.textColor, [MGLRuntimeStylingHelper testColorFunction]);
+ XCTAssertEqualObjects(gLayer.textHaloBlur, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.textHaloColor, [MGLRuntimeStylingHelper testColorFunction]);
XCTAssertEqualObjects(gLayer.textHaloWidth, [MGLRuntimeStylingHelper testNumberFunction]);
- XCTAssertEqualObjects(gLayer.textHaloBlur, [MGLRuntimeStylingHelper testNumberFunction]);
+ XCTAssertEqualObjects(gLayer.textOpacity, [MGLRuntimeStylingHelper testNumberFunction]);
XCTAssertEqualObjects(gLayer.textTranslate, [MGLRuntimeStylingHelper testOffsetFunction]);
XCTAssertEqualObjects(gLayer.textTranslateAnchor, [MGLRuntimeStylingHelper testEnumFunction:MGLTextTranslateAnchorViewport type:@encode(MGLTextTranslateAnchor)]);
}