summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2017-01-06 15:47:33 -0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2017-01-09 13:49:35 -0200
commiteaf03f41037e6f77eb8b8868ec309fb6d37c5592 (patch)
tree1cc3841b7de6c2b2cfcdf0b4193d79061952c4a0
parent0caa496bb3e77f25c0d53aa46ec47cdaaac5547d (diff)
downloadqtlocation-mapboxgl-eaf03f41037e6f77eb8b8868ec309fb6d37c5592.tar.gz
[Qt] Added line-dasharray to the example app
Showing how to add numbers in an array.
-rw-r--r--platform/qt/app/mapwindow.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/qt/app/mapwindow.cpp b/platform/qt/app/mapwindow.cpp
index bebf527cf2..0b453406f3 100644
--- a/platform/qt/app/mapwindow.cpp
+++ b/platform/qt/app/mapwindow.cpp
@@ -125,6 +125,12 @@ void MapWindow::keyPressEvent(QKeyEvent *ev)
m_map->setLayoutProperty("route", "line-join", "round");
m_map->setLayoutProperty("route", "line-cap", "round");
+ QVariantList lineDashArray;
+ lineDashArray.append(1);
+ lineDashArray.append(2);
+
+ m_map->setPaintProperty("route", "line-dasharray", lineDashArray);
+
// Markers at the beginning and end of the route
m_map->addImage("label-arrow", QImage(":label-arrow.svg"));
m_map->addImage("label-background", QImage(":label-background.svg"));