summaryrefslogtreecommitdiff
path: root/qmapwatchlet/metawatch-digital.qml
blob: 16206db063bc48d4b1e913d2b4f9c70380de3ce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import QtQuick 1.0
import QtMobility.location 1.2

Rectangle {
	width: 96
	height: 96

	color: "white"

	PositionSource {
		id: pos
		updateInterval: 5000
		active: watch.active
	}

	Map {
		id: map
		anchors.fill: parent;
		plugin : Plugin { name : "nokia" }
		center: pos.position.coordinate
	}

	Connections {
		target: watch
		onButtonPressed : {
			switch(button) {
			case 1:
				map.zoomLevel -= 1;
				break;
			case 2:
				map.zoomLevel += 1;
				break;
			}
		}
	}
}