Loading...

Adding QML GPS to BlackBerry 10

627 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Feb 11, 2013

Adding GPS to your app is quick and easy. If your using Cascades (QML) then follow these steps:

1. Add Location Permission to your Project

2. Add Qt Mobility to your QML page:
import QtMobilitySubset.location 1.1

3. Add GPS variables //! GPS Variables property string latitude property string longitude property variant currentCoord


4. Attach Position Source to the page

attachedObjects: [ PositionSource { id: positionSource //! Desired interval between updates in milliseconds updateInterval: 10000 //! When position changed, update the location strings onPositionChanged: { currentCoord = positionSource.position.coordinate; latitude = currentCoord.latitude; longitude = currentCoord.longitude; console.debug(latitude, longitude); positionSource.stop(); } } ]

5. Start PositionSource

positionSource.start()


Download Code:
http://codeviewer.org/view/code:3008

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...