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.
This commit is contained in:
Gali Nelle
2020-04-06 10:12:56 +03:00
committed by galinelle
parent 9a55c282fe
commit 8e581c88ea
26 changed files with 231 additions and 68 deletions

View File

@@ -714,13 +714,12 @@ void RenderLocationIndicatorLayer::evaluate(const PropertyEvaluationParameters&
renderImpl->parameters.puckSizePx = evaluated.get<style::BearingImageSize>();
renderImpl->parameters.puckHatSizePx = evaluated.get<style::TopImageSize>();
renderImpl->parameters.puckShadowSizePx = evaluated.get<style::ShadowImageSize>();
renderImpl->parameters.puckBearing = evaluated.get<style::Bearing>().getAngle();
const std::array<double, 3> pos = evaluated.get<style::Location>();
renderImpl->parameters.puckPosition = LatLng{pos[0], pos[1]};
// layout
if (!layout.get<style::Bearing>().isUndefined())
renderImpl->parameters.puckBearing = layout.get<style::Bearing>().asConstant();
if (!layout.get<style::BearingImage>().isUndefined())
renderImpl->parameters.puckImagePath = layout.get<style::BearingImage>().asConstant().id();
if (!layout.get<style::ShadowImage>().isUndefined())