diff options
author | Gali Nelle <galinelle.mapbox@gmail.com> | 2020-04-08 16:28:35 +0300 |
---|---|---|
committer | galinelle <paolo.angelelli@mapbox.com> | 2020-04-10 00:15:43 +0300 |
commit | 209857f8acc73d7950a1c8ec58f4ec7622287e55 (patch) | |
tree | a6cb095fffae224aae84e7d93dc38fbc7037d361 /platform | |
parent | e6c156420d2d287bd6d3449af3338f550dbf84f4 (diff) | |
download | qtlocation-mapboxgl-209857f8acc73d7950a1c8ec58f4ec7622287e55.tar.gz |
Fix LocationIndicator Layer
This changes image size properties to be scales instead of pixel sizes.
The commit also adds fixes for handling image updates with the same ID,
adds tests for expressions in paint properties, as well as tests for using images
with pixel ratio greater than 1.
Finally it moves image-tilt-displacement and perspective-compensation properties
from layout to paint properties, and includes other minor cleanups.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/glfw/glfw_view.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp index c65df4d1cb..aa320df831 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -991,10 +991,10 @@ void GLFWView::toggleLocationIndicatorLayer() { puckLayer->setBearingTransition(mbgl::style::TransitionOptions(mbgl::Duration::zero(), mbgl::Duration::zero())); puckLayer->setBearing(mbgl::style::Rotation(0.0)); puckLayer->setAccuracyRadiusBorderColor(premultiply(mbgl::Color{0.0, 1.0, 0.2, 0.4})); - puckLayer->setTopImageSize(24); - puckLayer->setBearingImageSize(72); - puckLayer->setShadowImageSize(96); - puckLayer->setImageTiltDisplacement(8.0f); // set to 0 for a "flat" puck + puckLayer->setTopImageSize(0.18); + puckLayer->setBearingImageSize(0.26); + puckLayer->setShadowImageSize(0.2); + puckLayer->setImageTiltDisplacement(7.0f); // set to 0 for a "flat" puck puckLayer->setPerspectiveCompensation(0.9); map->getStyle().addImage(std::make_unique<mbgl::style::Image>( |