-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Align layers with native SDK (11.5.1-alpha08) (#40)
* - add SetLayerPropertyFor * - align Expression.Operator * - align DslOperator * - alpha07 * - align Layer classes
- Loading branch information
1 parent
4bd5113
commit b9cfada
Showing
40 changed files
with
2,684 additions
and
1,871 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
496 changes: 0 additions & 496 deletions
496
src/libs/Mapbox.Maui/Models/Expressions/AllExpressions.cs
This file was deleted.
Oops, something went wrong.
181 changes: 94 additions & 87 deletions
181
src/libs/Mapbox.Maui/Models/Expressions/DslExpression.Factories.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
382 changes: 99 additions & 283 deletions
382
src/libs/Mapbox.Maui/Models/Expressions/DslOperator.cs
Large diffs are not rendered by default.
Oops, something went wrong.
129 changes: 129 additions & 0 deletions
129
src/libs/Mapbox.Maui/Models/Styles/Layers/BackgroundLayer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
namespace MapboxMaui.Styles; | ||
|
||
/// The background color or pattern of the map. | ||
/// | ||
/// - SeeAlso: [Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/#layers-background) | ||
public class BackgroundLayer : MapboxLayer | ||
{ | ||
public BackgroundLayer(string id) | ||
: base(id) | ||
{ | ||
Type = LayerType.Background; | ||
Visibility = new PropertyValue<Visibility>(MapboxMaui.Visibility.Visible); | ||
} | ||
/// The color with which the background will be drawn. | ||
/// Default value: "#000000". | ||
public PropertyValue<Color> BackgroundColor | ||
{ | ||
get => GetProperty<PropertyValue<Color>>( | ||
PaintCodingKeys.BackgroundColor, | ||
default, | ||
MapboxLayerKey.paint | ||
); | ||
set => SetProperty( | ||
PaintCodingKeys.BackgroundColor, | ||
value, | ||
MapboxLayerKey.paint | ||
); | ||
} | ||
/// Transition options for `backgroundColor`. | ||
public PropertyValue<StyleTransition> BackgroundColorTransition | ||
{ | ||
get => GetProperty<PropertyValue<StyleTransition>>( | ||
PaintCodingKeys.BackgroundColorTransition, | ||
default, | ||
MapboxLayerKey.paint | ||
); | ||
set => SetProperty( | ||
PaintCodingKeys.BackgroundColorTransition, | ||
value, | ||
MapboxLayerKey.paint | ||
); | ||
} | ||
/// Controls the intensity of light emitted on the source features. | ||
/// Default value: 0. Minimum value: 0. | ||
public PropertyValue<double> BackgroundEmissiveStrength | ||
{ | ||
get => GetProperty<PropertyValue<double>>( | ||
PaintCodingKeys.BackgroundEmissiveStrength, | ||
default, | ||
MapboxLayerKey.paint | ||
); | ||
set => SetProperty( | ||
PaintCodingKeys.BackgroundEmissiveStrength, | ||
value, | ||
MapboxLayerKey.paint | ||
); | ||
} | ||
/// Transition options for `backgroundEmissiveStrength`. | ||
public PropertyValue<StyleTransition> BackgroundEmissiveStrengthTransition | ||
{ | ||
get => GetProperty<PropertyValue<StyleTransition>>( | ||
PaintCodingKeys.BackgroundEmissiveStrengthTransition, | ||
default, | ||
MapboxLayerKey.paint | ||
); | ||
set => SetProperty( | ||
PaintCodingKeys.BackgroundEmissiveStrengthTransition, | ||
value, | ||
MapboxLayerKey.paint | ||
); | ||
} | ||
/// The opacity at which the background will be drawn. | ||
/// Default value: 1. Value range: [0, 1] | ||
public PropertyValue<double> BackgroundOpacity | ||
{ | ||
get => GetProperty<PropertyValue<double>>( | ||
PaintCodingKeys.BackgroundOpacity, | ||
default, | ||
MapboxLayerKey.paint | ||
); | ||
set => SetProperty( | ||
PaintCodingKeys.BackgroundOpacity, | ||
value, | ||
MapboxLayerKey.paint | ||
); | ||
} | ||
/// Transition options for `backgroundOpacity`. | ||
public PropertyValue<StyleTransition> BackgroundOpacityTransition | ||
{ | ||
get => GetProperty<PropertyValue<StyleTransition>>( | ||
PaintCodingKeys.BackgroundOpacityTransition, | ||
default, | ||
MapboxLayerKey.paint | ||
); | ||
set => SetProperty( | ||
PaintCodingKeys.BackgroundOpacityTransition, | ||
value, | ||
MapboxLayerKey.paint | ||
); | ||
} | ||
/// Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels. | ||
public PropertyValue<ResolvedImage> BackgroundPattern | ||
{ | ||
get => GetProperty<PropertyValue<ResolvedImage>>( | ||
PaintCodingKeys.BackgroundPattern, | ||
default, | ||
MapboxLayerKey.paint | ||
); | ||
set => SetProperty( | ||
PaintCodingKeys.BackgroundPattern, | ||
value, | ||
MapboxLayerKey.paint | ||
); | ||
} | ||
|
||
public static class PaintCodingKeys { | ||
public const string BackgroundColor = "background-color"; | ||
public const string BackgroundColorTransition = "background-color-transition"; | ||
public const string BackgroundEmissiveStrength = "background-emissive-strength"; | ||
public const string BackgroundEmissiveStrengthTransition = "background-emissive-strength-transition"; | ||
public const string BackgroundOpacity = "background-opacity"; | ||
public const string BackgroundOpacityTransition = "background-opacity-transition"; | ||
public const string BackgroundPattern = "background-pattern"; | ||
} | ||
|
||
public static class LayoutCodingKeys { | ||
|
||
} | ||
} |
Oops, something went wrong.