Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.7.0
-
Qt 5.7.0, Android, iOS
Description
To get a single Position from documentation update() should be used.
I'm getting the Position, but it took always around 2 minutes to get positionUpdated SIGNAL.
workaround:
set updateInterval to 5000
use start() instead of update()
and when getting first positionUpdate stop()
then the position was delivered immediately
// positionSource.update(): 2 minutes to get first positionChanged() // positionSource.start(): 2 seco0nds or so PositionSource { id: positionSource updateInterval: 5000 onPositionChanged: { // do something with position.coordinate // stop here if start() was used to get single position stop() } onSourceErrorChanged: { if (sourceError == PositionSource.NoError) { console.log ("NO ERROR") return } console.log("Source error: " + sourceError + " is GPS ON ?") active = false } onUpdateTimeout: { console.log ("TIMEOUT POSITION Source") active = false } } // positionSource