summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorGali Nelle <galinelle.mapbox@gmail.com>2020-04-08 16:28:35 +0300
committergalinelle <paolo.angelelli@mapbox.com>2020-04-10 00:15:43 +0300
commit209857f8acc73d7950a1c8ec58f4ec7622287e55 (patch)
treea6cb095fffae224aae84e7d93dc38fbc7037d361 /platform
parente6c156420d2d287bd6d3449af3338f550dbf84f4 (diff)
downloadqtlocation-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.cpp8
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>(