12 import org.kde.edu.marble 0.11
13 import com.nokia.meego 1.0
25 signal mouseClickGeoPosition(real longitude, real latitude)
26 signal placemarkSelected(variant placemark)
28 property alias mapThemeModel: map.mapThemeModel
31 property alias bookmarks: map.bookmarks
32 property alias routing: map.routing
35 property alias navigation: map.navigation
36 property alias cloudSync: map.cloudSync
44 property bool initialized:
false
46 workOffline: settings.workOffline
47 mapThemeId: settings.mapTheme
48 radius: settings.quitRadius
49 projection: settings.projection
50 activeFloatItems: [
"compass",
"scalebar",
"progress" ]
51 activeRenderPlugins: settings.activeRenderPlugins
66 positionSource: positionProvider
67 showTrack: settings.showTrack
68 positionMarker: marker
70 onLastKnownPositionChanged: {
71 settings.lastKnownLongitude = map.tracking.lastKnownPosition.longitude
72 settings.lastKnownLatitude = map.tracking.lastKnownPosition.latitude
73 map.updatePositionIndicator()
79 muted: settings.voiceNavigationMuted
80 speaker: settings.voiceNavigationSpeaker
81 soundEnabled: settings.voiceNavigationSoundEnabled
87 owncloudServer: settings.owncloudServer
88 owncloudUsername: settings.owncloudUsername
89 owncloudPassword: settings.owncloudPassword
92 Component.onCompleted: {
93 mouseClickGeoPosition.connect( screen.mouseClickGeoPosition )
96 center.longitude = settings.quitLongitude
97 center.latitude = settings.quitLatitude
98 tracking.lastKnownPosition.longitude = settings.lastKnownLongitude
99 tracking.lastKnownPosition.latitude = settings.lastKnownLatitude
103 Component.onDestruction: {
104 settings.quitRadius =
radius
105 settings.quitLongitude = center.longitude
106 settings.quitLatitude = center.latitude
116 source:
"qrc:/icons/placemark.svg"
117 transformOrigin: Item.Bottom
119 fillMode: Image.PreserveAspectFit
126 anchors.top: parent.top
127 anchors.left: parent.left
128 horizontalAlignment: Text.AlignHCenter
129 verticalAlignment: Text.AlignVCenter
140 height: nameLabel.height + routingButtons.height + 30
148 anchors.top: parent.top
149 anchors.left: parent.left
150 anchors.right: parent.right
156 onClicked: routingOptions.visible =
false
162 anchors.bottom: parent.bottom
163 anchors.horizontalCenter: parent.horizontalCenter
164 anchors.bottomMargin: 10
175 anchors.centerIn: parent
181 routingOptions.visible =
false
182 settings.gpsTracking =
true
183 map.routing.clearRoute()
184 map.routing.setVia( 0, map.tracking.lastKnownPosition.longitude, map.tracking.lastKnownPosition.latitude )
185 map.routing.setVia( 1, longitude, latitude )
186 openActivity(
"Routing" )
196 routingOptions.visible = !routingOptions.visible
202 onMouseClickGeoPosition: routingOptions.visible =
false
207 onPlacemarkSelected: {
208 pageStack.find(
function(page) {
211 if (page.uid !==
"edu.kde.org.marble.placemarkActivityPage") {
212 openPage(
"qrc:/activities/Placemark.qml");
216 screen.placemarkSelected(placemark)
230 source:
"QtMobilityPositionProviderPlugin"
233 active: settings.gpsTracking
237 growAnimation.running =
true
245 fillMode: Image.PreserveAspectFit
247 source: positionProvider.hasPosition ?
"qrc:/icons/marker.svg" :
"qrc:/icons/marker-yellow.svg"
251 PropertyAnimation on x { duration: 300; easing.type: Easing.OutBounce }
252 PropertyAnimation on y { duration: 300; easing.type: Easing.OutBounce }
253 SequentialAnimation {
272 visible: settings.showPositionIndicator
279 function find( term ) {
280 map.search.find( term )
284 function centerOn( lon, lat ) {
285 map.center.longitude = lon
286 map.center.latitude = lat
289 function setGeoSceneProperty( key, value ) {
290 map.setGeoSceneProperty( key, value )
293 function downloadRoute( offset, from, to ) {
294 map.downloadRoute( offset, from, to )
297 function downloadArea( from, to ) {
298 map.downloadArea( from, to )
301 function getCenter() {
305 function setDataPluginDelegate(
id, delegate ) {
306 map.setDataPluginDelegate(
id, delegate )
309 function renderPlugin( name ) {
310 return map.renderPlugin( name )
static qreal radius(qreal zoom)
QFuture< void > map(Sequence &sequence, MapFunction function)