Extract Location of the user
-
Hi ,
I am new to Qt, can you please share some samples of how can i extract the Latitude/Longitude information for an user ? I did check the documentation for "GeoLocation":http://doc.qt.nokia.com/qtmobility/qml-geolocation.html but it did not make much sense to me, so please share any sample / working code...
Thanks
Ronak -
Welcome to forum,
I am not much into QML , but in doc, seen GeoLocation.Latitude and GeoLocation.Longitude elements. And both are type double.
Have you tried any of those location "examples":http://doc.qt.nokia.com/qtmobility/all-examples.html?
-
Hi Rahul,
Thanks for the link. But they are mostly on C++ not QML :(
Anyway i did find the solution:
@
PositionSource{
id: positionSource
updateInterval: 1000
active: true
onPositionChanged: {
userLocation.latitude = position.coordinate.latitude
userLocation.longitude = position.coordinate.longitude
}
}
@Thanks
Ronak[EDIT: code formatting, please wrap in @-tags, Volker]