[SailfishDevel] (QtLocation 5.0) Coordinate is not a type
christopher.lamb at thurweb.ch
christopher.lamb at thurweb.ch
Wed Nov 20 12:11:43 UTC 2013
Hi Michael
I have been pointed to this:
http://doc-snapshot.qt-project.org/qt5-stable/coordinate.html
Which means that something like the code below should work:
This is a little different from the Qt4.8 Mobility Location, where a
coordinate could be directly instantiated and manipulated in QML.
mfg
Chris
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtPositioning 5.0
Page {
id: page
Component.onCompleted: {
myLoc.coordinate.latitude = 21.3;
console.log ("latitude is " + myLoc.coordinate.latitude);
}
Location {
id: myLoc
coordinate {
latitude: -27.5
longitude: 153.1
}
}
}
More information about the Devel
mailing list