[ios, macos, android] Commit accumulated make style-code updates
Manually ignoring all heatmap and hillshade related changes.
This commit is contained in:
@@ -1535,6 +1535,7 @@ public class PropertyFactory {
|
||||
return new PaintPropertyValue<>("fill-extrusion-opacity", expression);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.
|
||||
*
|
||||
@@ -2544,7 +2545,7 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of image in sprite to use for drawing an image background. A string with `{tokens}` replaced, referencing the data property to pull from. (`{token}` replacement is only supported for literal {@link PropertyFactory#iconImage} values; not for property functions.)
|
||||
* Name of image in sprite to use for drawing an image background. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.
|
||||
*
|
||||
* @param value a String value
|
||||
* @return property wrapper around String
|
||||
@@ -2554,7 +2555,7 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of image in sprite to use for drawing an image background. A string with `{tokens}` replaced, referencing the data property to pull from. (`{token}` replacement is only supported for literal {@link PropertyFactory#iconImage} values; not for property functions.)
|
||||
* Name of image in sprite to use for drawing an image background. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.
|
||||
*
|
||||
* @param value a String value
|
||||
* @return property wrapper around String
|
||||
@@ -2565,7 +2566,7 @@ public class PropertyFactory {
|
||||
|
||||
|
||||
/**
|
||||
* Name of image in sprite to use for drawing an image background. A string with `{tokens}` replaced, referencing the data property to pull from. (`{token}` replacement is only supported for literal {@link PropertyFactory#iconImage} values; not for property functions.)
|
||||
* Name of image in sprite to use for drawing an image background. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.
|
||||
*
|
||||
* @param <T> the function input type
|
||||
* @param function a wrapper function for String
|
||||
@@ -2672,7 +2673,7 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. When combined with {@link PropertyFactory#iconRotate} the offset will be as if the rotated direction was up.
|
||||
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of {@link PropertyFactory#iconSize} to obtain the final offset in density-independent pixels. When combined with {@link PropertyFactory#iconRotate} the offset will be as if the rotated direction was up.
|
||||
*
|
||||
* @param value a Float[] value
|
||||
* @return property wrapper around Float[]
|
||||
@@ -2682,7 +2683,7 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. When combined with {@link PropertyFactory#iconRotate} the offset will be as if the rotated direction was up.
|
||||
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of {@link PropertyFactory#iconSize} to obtain the final offset in density-independent pixels. When combined with {@link PropertyFactory#iconRotate} the offset will be as if the rotated direction was up.
|
||||
*
|
||||
* @param value a Float[] value
|
||||
* @return property wrapper around Float[]
|
||||
@@ -2693,7 +2694,7 @@ public class PropertyFactory {
|
||||
|
||||
|
||||
/**
|
||||
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. When combined with {@link PropertyFactory#iconRotate} the offset will be as if the rotated direction was up.
|
||||
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of {@link PropertyFactory#iconSize} to obtain the final offset in density-independent pixels. When combined with {@link PropertyFactory#iconRotate} the offset will be as if the rotated direction was up.
|
||||
*
|
||||
* @param <T> the function input type
|
||||
* @param function a wrapper function for Float[]
|
||||
@@ -2832,7 +2833,7 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Value to use for a text label. Feature properties are specified using tokens like `{field_name}`. (`{token}` replacement is only supported for literal {@link PropertyFactory#textField} values; not for property functions.)
|
||||
* Value to use for a text label. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.
|
||||
*
|
||||
* @param value a String value
|
||||
* @return property wrapper around String
|
||||
@@ -2842,7 +2843,7 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Value to use for a text label. Feature properties are specified using tokens like `{field_name}`. (`{token}` replacement is only supported for literal {@link PropertyFactory#textField} values; not for property functions.)
|
||||
* Value to use for a text label. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.
|
||||
*
|
||||
* @param value a String value
|
||||
* @return property wrapper around String
|
||||
@@ -2853,7 +2854,7 @@ public class PropertyFactory {
|
||||
|
||||
|
||||
/**
|
||||
* Value to use for a text label. Feature properties are specified using tokens like `{field_name}`. (`{token}` replacement is only supported for literal {@link PropertyFactory#textField} values; not for property functions.)
|
||||
* Value to use for a text label. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators.
|
||||
*
|
||||
* @param <T> the function input type
|
||||
* @param function a wrapper function for String
|
||||
@@ -2887,11 +2888,11 @@ public class PropertyFactory {
|
||||
/**
|
||||
* Font stack to use for displaying text.
|
||||
*
|
||||
* @param <T> the function input type
|
||||
* @param function a wrapper function for String[]
|
||||
* @param <Z> the zoom parameter type
|
||||
* @param function a wrapper {@link CameraFunction} for String[]
|
||||
* @return property wrapper around a String[] function
|
||||
*/
|
||||
public static <T> PropertyValue<Function<T, String[]>> textFont(Function<T, String[]> function) {
|
||||
public static <Z extends Number> PropertyValue<CameraFunction<Z, String[]>> textFont(CameraFunction<Z, String[]> function) {
|
||||
return new LayoutPropertyValue<>("text-font", function);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleScaleAlignment) {
|
||||
};
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `MGLCircleStyleLayer.circleTranslation`.
|
||||
|
||||
Values of this type are used in the `MGLCircleStyleLayer.circleTranslationAnchor`
|
||||
property.
|
||||
@@ -489,7 +489,7 @@ MGL_EXPORT
|
||||
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslate __attribute__((unavailable("Use circleTranslation instead.")));
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `circleTranslation`.
|
||||
|
||||
The default value of this property is an `MGLStyleValue` object containing an
|
||||
`NSValue` object containing `MGLCircleTranslationAnchorMap`. Set this property
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for
|
||||
`MGLFillExtrusionStyleLayer.fillExtrusionTranslation`.
|
||||
|
||||
Values of this type are used in the `MGLFillExtrusionStyleLayer.fillExtrusionTranslationAnchor`
|
||||
property.
|
||||
@@ -313,7 +314,7 @@ MGL_EXPORT
|
||||
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillExtrusionTranslate __attribute__((unavailable("Use fillExtrusionTranslation instead.")));
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `fillExtrusionTranslation`.
|
||||
|
||||
The default value of this property is an `MGLStyleValue` object containing an
|
||||
`NSValue` object containing `MGLFillExtrusionTranslationAnchorMap`. Set this
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `MGLFillStyleLayer.fillTranslation`.
|
||||
|
||||
Values of this type are used in the `MGLFillStyleLayer.fillTranslationAnchor`
|
||||
property.
|
||||
@@ -322,7 +322,7 @@ MGL_EXPORT
|
||||
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslate __attribute__((unavailable("Use fillTranslation instead.")));
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `fillTranslation`.
|
||||
|
||||
The default value of this property is an `MGLStyleValue` object containing an
|
||||
`NSValue` object containing `MGLFillTranslationAnchorMap`. Set this property to
|
||||
|
||||
@@ -58,7 +58,7 @@ typedef NS_ENUM(NSUInteger, MGLLineJoin) {
|
||||
};
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `MGLLineStyleLayer.lineTranslation`.
|
||||
|
||||
Values of this type are used in the `MGLLineStyleLayer.lineTranslationAnchor`
|
||||
property.
|
||||
@@ -515,7 +515,7 @@ MGL_EXPORT
|
||||
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslate __attribute__((unavailable("Use lineTranslation instead.")));
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `lineTranslation`.
|
||||
|
||||
The default value of this property is an `MGLStyleValue` object containing an
|
||||
`NSValue` object containing `MGLLineTranslationAnchorMap`. Set this property to
|
||||
|
||||
@@ -154,13 +154,6 @@ MGL_EXPORT
|
||||
*/
|
||||
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterFadeDuration;
|
||||
|
||||
/**
|
||||
The transition affecting any changes to this layer’s `rasterFadeDuration` property.
|
||||
|
||||
This property corresponds to the `raster-fade-duration-transition` property in the style JSON file format.
|
||||
*/
|
||||
@property (nonatomic) MGLTransition rasterFadeDurationTransition;
|
||||
|
||||
/**
|
||||
Rotates hues around the color wheel.
|
||||
|
||||
|
||||
@@ -175,24 +175,6 @@
|
||||
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
|
||||
}
|
||||
|
||||
- (void)setRasterFadeDurationTransition:(MGLTransition )transition {
|
||||
MGLAssertStyleLayerIsValid();
|
||||
|
||||
mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } };
|
||||
self.rawLayer->setRasterFadeDurationTransition(options);
|
||||
}
|
||||
|
||||
- (MGLTransition)rasterFadeDurationTransition {
|
||||
MGLAssertStyleLayerIsValid();
|
||||
|
||||
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getRasterFadeDurationTransition();
|
||||
MGLTransition transition;
|
||||
transition.duration = MGLTimeIntervalFromDuration(transitionOptions.duration.value_or(mbgl::Duration::zero()));
|
||||
transition.delay = MGLTimeIntervalFromDuration(transitionOptions.delay.value_or(mbgl::Duration::zero()));
|
||||
|
||||
return transition;
|
||||
}
|
||||
|
||||
- (void)setRasterHueRotation:(MGLStyleValue<NSNumber *> *)rasterHueRotation {
|
||||
MGLAssertStyleLayerIsValid();
|
||||
|
||||
|
||||
@@ -68,14 +68,15 @@ typedef NS_ENUM(NSUInteger, MGLIconPitchAlignment) {
|
||||
*/
|
||||
MGLIconPitchAlignmentViewport,
|
||||
/**
|
||||
Automatically matches the value of `iconRotationAlignment`.
|
||||
Automatically matches the value of
|
||||
`MGLSymbolStyleLayer.iconRotationAlignment`.
|
||||
*/
|
||||
MGLIconPitchAlignmentAuto,
|
||||
};
|
||||
|
||||
/**
|
||||
In combination with `symbolPlacement`, determines the rotation behavior of
|
||||
icons.
|
||||
In combination with `MGLSymbolStyleLayer.symbolPlacement`, determines the
|
||||
rotation behavior of icons.
|
||||
|
||||
Values of this type are used in the `MGLSymbolStyleLayer.iconRotationAlignment`
|
||||
property.
|
||||
@@ -89,7 +90,7 @@ typedef NS_ENUM(NSUInteger, MGLIconRotationAlignment) {
|
||||
MGLIconRotationAlignmentMap,
|
||||
/**
|
||||
Produces icons whose x-axes are aligned with the x-axis of the viewport,
|
||||
regardless of the value of `symbolPlacement`.
|
||||
regardless of the value of `MGLSymbolStyleLayer.symbolPlacement`.
|
||||
*/
|
||||
MGLIconRotationAlignmentViewport,
|
||||
/**
|
||||
@@ -226,14 +227,15 @@ typedef NS_ENUM(NSUInteger, MGLTextPitchAlignment) {
|
||||
*/
|
||||
MGLTextPitchAlignmentViewport,
|
||||
/**
|
||||
Automatically matches the value of `textRotationAlignment`.
|
||||
Automatically matches the value of
|
||||
`MGLSymbolStyleLayer.textRotationAlignment`.
|
||||
*/
|
||||
MGLTextPitchAlignmentAuto,
|
||||
};
|
||||
|
||||
/**
|
||||
In combination with `symbolPlacement`, determines the rotation behavior of the
|
||||
individual glyphs forming the text.
|
||||
In combination with `MGLSymbolStyleLayer.symbolPlacement`, determines the
|
||||
rotation behavior of the individual glyphs forming the text.
|
||||
|
||||
Values of this type are used in the `MGLSymbolStyleLayer.textRotationAlignment`
|
||||
property.
|
||||
@@ -247,7 +249,7 @@ typedef NS_ENUM(NSUInteger, MGLTextRotationAlignment) {
|
||||
MGLTextRotationAlignmentMap,
|
||||
/**
|
||||
Produces glyphs whose x-axes are aligned with the x-axis of the viewport,
|
||||
regardless of the value of `symbolPlacement`.
|
||||
regardless of the value of `MGLSymbolStyleLayer.symbolPlacement`.
|
||||
*/
|
||||
MGLTextRotationAlignmentViewport,
|
||||
/**
|
||||
@@ -281,7 +283,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTransform) {
|
||||
};
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `MGLSymbolStyleLayer.iconTranslation`.
|
||||
|
||||
Values of this type are used in the `MGLSymbolStyleLayer.iconTranslationAnchor`
|
||||
property.
|
||||
@@ -298,7 +300,7 @@ typedef NS_ENUM(NSUInteger, MGLIconTranslationAnchor) {
|
||||
};
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `MGLSymbolStyleLayer.textTranslation`.
|
||||
|
||||
Values of this type are used in the `MGLSymbolStyleLayer.textTranslationAnchor`
|
||||
property.
|
||||
@@ -443,8 +445,11 @@ MGL_EXPORT
|
||||
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *iconIgnorePlacement __attribute__((unavailable("Use iconIgnoresPlacement instead.")));
|
||||
|
||||
/**
|
||||
Name of image in sprite to use for drawing an image background. A string with
|
||||
{tokens} replaced, referencing the data property to pull from.
|
||||
Name of image in sprite to use for drawing an image background. Within literal
|
||||
values, attribute names enclosed in curly brackets (e.g. `{token}`) are
|
||||
replaced with the value of the named attribute. Expressions do not support this
|
||||
syntax; for equivalent functionality in expressions, use
|
||||
`stringByAppendingString:` and key path expressions.
|
||||
|
||||
This attribute corresponds to the <a
|
||||
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-image"><code>icon-image</code></a>
|
||||
@@ -646,8 +651,8 @@ MGL_EXPORT
|
||||
|
||||
/**
|
||||
Scales the original size of the icon by the provided factor. The new point size
|
||||
of the image will be the original point size multiplied by `iconSize`. 1 is the
|
||||
original size; 3 triples the size of the image.
|
||||
of the image will be the original point size multiplied by `iconScale`. 1 is
|
||||
the original size; 3 triples the size of the image.
|
||||
|
||||
This property is measured in factor of the original icon sizes.
|
||||
|
||||
@@ -935,9 +940,10 @@ MGL_EXPORT
|
||||
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *symbolSpacing;
|
||||
|
||||
/**
|
||||
Value to use for a text label. Feature properties are specified using tokens
|
||||
like {field_name}. (Token replacement is only supported for literal
|
||||
`textField` values--not for property functions.)
|
||||
Value to use for a text label. Within literal values, attribute names enclosed
|
||||
in curly brackets (e.g. `{token}`) are replaced with the value of the named
|
||||
attribute. Expressions do not support this syntax; for equivalent functionality
|
||||
in expressions, use `stringByAppendingString:` and key path expressions.
|
||||
|
||||
The default value of this property is an `MGLStyleValue` object containing the
|
||||
empty string. Set this property to `nil` to reset it to the default value.
|
||||
@@ -1716,7 +1722,7 @@ MGL_EXPORT
|
||||
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslate __attribute__((unavailable("Use iconTranslation instead.")));
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `iconTranslation`.
|
||||
|
||||
The default value of this property is an `MGLStyleValue` object containing an
|
||||
`NSValue` object containing `MGLIconTranslationAnchorMap`. Set this property to
|
||||
@@ -2041,7 +2047,7 @@ MGL_EXPORT
|
||||
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTranslate __attribute__((unavailable("Use textTranslation instead.")));
|
||||
|
||||
/**
|
||||
Controls the translation reference point.
|
||||
Controls the frame of reference for `textTranslation`.
|
||||
|
||||
The default value of this property is an `MGLStyleValue` object containing an
|
||||
`NSValue` object containing `MGLTextTranslationAnchorMap`. Set this property to
|
||||
|
||||
@@ -193,15 +193,6 @@
|
||||
XCTAssertThrowsSpecificNamed(layer.rasterFadeDuration = functionStyleValue, NSException, NSInvalidArgumentException, @"MGLStyleValue should raise an exception if it is applied to a property that cannot support it");
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeInterval compositeStops:@{@18: constantStyleValue} attributeName:@"" options:nil];
|
||||
XCTAssertThrowsSpecificNamed(layer.rasterFadeDuration = functionStyleValue, NSException, NSInvalidArgumentException, @"MGLStyleValue should raise an exception if it is applied to a property that cannot support it");
|
||||
// Transition property test
|
||||
layer.rasterFadeDurationTransition = transitionTest;
|
||||
auto toptions = rawLayer->getRasterFadeDurationTransition();
|
||||
XCTAssert(toptions.delay && MGLTimeIntervalFromDuration(*toptions.delay) == transitionTest.delay);
|
||||
XCTAssert(toptions.duration && MGLTimeIntervalFromDuration(*toptions.duration) == transitionTest.duration);
|
||||
|
||||
MGLTransition rasterFadeDurationTransition = layer.rasterFadeDurationTransition;
|
||||
XCTAssertEqual(rasterFadeDurationTransition.delay, transitionTest.delay);
|
||||
XCTAssertEqual(rasterFadeDurationTransition.duration, transitionTest.duration);
|
||||
}
|
||||
|
||||
// raster-hue-rotate
|
||||
|
||||
Reference in New Issue
Block a user