diff options
author | Gali Nelle <galinelle.mapbox@gmail.com> | 2020-04-06 10:12:56 +0300 |
---|---|---|
committer | galinelle <paolo.angelelli@mapbox.com> | 2020-04-08 14:00:26 +0300 |
commit | 8e581c88ea855998a2746e57f1a5fc46ee62faee (patch) | |
tree | 9a158b1a4281a6c894025cc6758a0c9c59dfd5b0 /src/mbgl/style/layers/location_indicator_layer_properties.hpp | |
parent | 9a55c282fecfdd76b1acdf64cef0ce2ed99472ef (diff) | |
download | qtlocation-mapboxgl-8e581c88ea855998a2746e57f1a5fc46ee62faee.tar.gz |
Make location indicator bearing a paint property
This change introduces a new property type, Rotation, that uses
a custom interpolator, and that is currently applied to
all style properties named "bearing", with a period attribute.
Diffstat (limited to 'src/mbgl/style/layers/location_indicator_layer_properties.hpp')
-rw-r--r-- | src/mbgl/style/layers/location_indicator_layer_properties.hpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mbgl/style/layers/location_indicator_layer_properties.hpp b/src/mbgl/style/layers/location_indicator_layer_properties.hpp index d1f0879f74..d73ce33eb9 100644 --- a/src/mbgl/style/layers/location_indicator_layer_properties.hpp +++ b/src/mbgl/style/layers/location_indicator_layer_properties.hpp @@ -16,11 +16,6 @@ namespace mbgl { namespace style { -struct Bearing : LayoutProperty<float> { - static constexpr const char *name() { return "bearing"; } - static float defaultValue() { return 0; } -}; - struct BearingImage : LayoutProperty<expression::Image> { static constexpr const char *name() { return "bearing-image"; } static expression::Image defaultValue() { return {}; } @@ -58,6 +53,10 @@ struct AccuracyRadiusColor : PaintProperty<Color> { static Color defaultValue() { return Color::white(); } }; +struct Bearing : PaintProperty<Rotation> { + static Rotation defaultValue() { return 0; } +}; + struct BearingImageSize : PaintProperty<float> { static float defaultValue() { return 0; } }; @@ -75,7 +74,6 @@ struct TopImageSize : PaintProperty<float> { }; class LocationIndicatorLayoutProperties : public Properties< - Bearing, BearingImage, ImageTiltDisplacement, PerspectiveCompensation, @@ -87,6 +85,7 @@ class LocationIndicatorPaintProperties : public Properties< AccuracyRadius, AccuracyRadiusBorderColor, AccuracyRadiusColor, + Bearing, BearingImageSize, Location, ShadowImageSize, |