summaryrefslogtreecommitdiff
path: root/examples/location/mapviewer/map/MapComponent.qml
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-02-08 14:28:44 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-02-10 11:57:48 +0000
commitc9266145e7d60e0981f24087050f552617ff2077 (patch)
treedd6bd4e83433d1c00eb078ef11ca4494f4dca01d /examples/location/mapviewer/map/MapComponent.qml
parentdba8ff01b82aa8eb0ca2292592f55665b90c3507 (diff)
downloadqtlocation-c9266145e7d60e0981f24087050f552617ff2077.tar.gz
Add rotation/tilt/fov sliders to the map viewer example
This patch adds a new qml element, MapSliders, that consist of a set of sliders to control camera parameters. This element can be hidden/shown using the included semitransparent button. The element can also be ported to the other examples to offer the same controls. This element can be positioned on the left or the right of the map, and for this example it has been moved to the left to not occlude the minimap. Change-Id: Icc56d90b181c2481727e73e3d332a66c05352f57 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'examples/location/mapviewer/map/MapComponent.qml')
-rw-r--r--examples/location/mapviewer/map/MapComponent.qml19
1 files changed, 4 insertions, 15 deletions
diff --git a/examples/location/mapviewer/map/MapComponent.qml b/examples/location/mapviewer/map/MapComponent.qml
index 3525e5f1..c3d5dfd2 100644
--- a/examples/location/mapviewer/map/MapComponent.qml
+++ b/examples/location/mapviewer/map/MapComponent.qml
@@ -364,22 +364,11 @@ Map {
anchorPoint: Qt.point(-poiTheQtComapny.sourceItem.width * 0.5,poiTheQtComapny.sourceItem.height * 1.5)
}
-
- Slider {
- id: zoomSlider;
+ MapSliders {
+ id: sliders
z: map.z + 3
- minimumValue: map.minimumZoomLevel;
- maximumValue: map.maximumZoomLevel;
- anchors.margins: 10
- anchors.bottom: scale.top
- anchors.top: parent.top
- anchors.right: parent.right
- orientation : Qt.Vertical
- value: map.zoomLevel
- onValueChanged: {
- if (value >= 0)
- map.zoomLevel = value
- }
+ mapSource: map
+ edge: Qt.LeftEdge
}
Item {