8 property alias centerLatitude: map.centerLatitude
9 property alias centerLongitude: map.centerLongitude
10 property alias gpsLocationLatitude: map.gpsLocationLatitude
11 property alias gpsLocationLongitude: map.gpsLocationLongitude
16 property alias latitude: animLatitude.to
17 property alias longitude: animLongitude.to
21 property: "centerLatitude"
22 from: map.centerLatitude
24 easing.type: Easing.InOutCubic
29 property: "centerLongitude"
30 from: map.centerLongitude
32 easing.type: Easing.InOutCubic
36 function panTo(latitude, longitude) {
37 console.log("Map.panTo", latitude, longitude)
38 if (!panAnimation.running) {
39 panAnimation.latitude = latitude
40 panAnimation.longitude = longitude
41 panAnimation.running = true
56 width: logo.width + 20
57 height: logo.height + 20
63 source: "qrc:/res/ixonos_logo.png"
64 anchors.centerIn: parent
65 anchors.horizontalCenterOffset: 3
66 anchors.verticalCenterOffset: 5
71 property int prevMouseX: 0
72 property int prevMouseY: 0
78 onMousePositionChanged: {
79 if (mouse.buttons & Qt.LeftButton) {
80 var diffX = mouse.x - prevMouseX
81 var diffY = mouse.y - prevMouseY
82 map.pan(-diffX, -diffY)
88 map.onClicked(mouseX, mouseY)
93 if (event.key == Qt.Key_F7)
95 else if (event.key == Qt.Key_F8)
101 x: parent.width/2 - width/2
102 y: parent.height/2 - height/2
104 source: "qrc:/res/sight.png"
110 y: parent.height - height - 5
112 height: zoomIn.height / 2
115 color: palette.button
116 border.color: palette.highlight
121 verticalAlignment: "AlignVCenter"
122 horizontalAlignment: "AlignHCenter"
123 text: map.distanceToGpsLocationText
125 font.pixelSize: height / 3
132 y: parent.height - height - gpsDistance.height - 10
134 height: zoomIn.height
137 color: palette.button
138 border.color: palette.highlight
142 source: "qrc:/res/gps_position.png"
143 anchors.verticalCenter: parent.verticalCenter
144 anchors.horizontalCenter: parent.horizontalCenter
148 source: "qrc:/res/gps_position_dir.png"
149 anchors.verticalCenter: parent.verticalCenter
150 anchors.horizontalCenter: parent.horizontalCenter
151 rotation: map.angleToGpsLocation
152 opacity: map.distanceToGpsLocation < 1.0 ? 0.0 : 1.0
158 onClicked: ParallelAnimation {
161 property: "centerLatitude"
162 from: map.centerLatitude
163 to: map.gpsLocationLatitude
165 easing.type: Easing.InOutCubic
169 property: "centerLongitude"
170 from: map.centerLongitude
171 to: map.gpsLocationLongitude
173 easing.type: Easing.InOutCubic
180 when: mouseArea3.pressed
194 source: "qrc:/res/zoom_in.png"
207 when: mouseArea1.pressed
219 y: zoomIn.y + zoomIn.height + 5
221 source: "qrc:/res/zoom_out.png"
233 when: mouseArea2.pressed