Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Trusted Contributor
Bluenoser
Posts: 165
Registered: ‎04-04-2012
My Carrier: Bell
Accepted Solution

QTMobility or QTLocation?

[ Edited ]

I am trying to add a little GPS functionality to my app. I have been trying to read the documentation and am getting a little confused and there are problems in compiliing my app.

 

An example of the confusion. In this link

 

https://developer.blackberry.com/cascades/documentation/device_platform/location/index.html

 

It states the includes as

 

#include <QtLocationSubset/QGeoAddress>
#include <QtLocationSubset/QGeoCoordinate>
#include <QtLocationSubset/QGeoPlace>
#include <QtLocationSubset/QGeoPositionInfo>
#include <QtLocationSubset/QGeoPositionInfoSource>
#include <QtLocationSubset/QGeoSatelliteInfo>
#include <QtLocationSubset/QGeoSatelliteInfoSource>
#include <QtLocationSubset/QGeoSearchManager>
#include <QtLocationSubset/QGeoSearchManagerEngine>
#include <QtLocationSubset/QGeoSearchReply>
#include <QtLocationSubset/QNmeaPositionInfoSource>

and to add

 

LIBS += -lQtLocationSubset

 to the .PRO file. But when you go and look at the APIs, for example

 

https://developer.blackberry.com/cascades/reference/qtmobilitysubset__qgeopositioninfo.html

 

tells you to add the include

 

#include <QtMobilitySubset/QGeoPositionInfo>

 There seems to be a mismatch in documentation. It would be nice if there was a working sample code that just got GPS latitide and longitude.

 

  Also, since this is being declared as QtLocationSubset, why is the namespace QtMobilitySubset?

 

Thanks

 

 

 

Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: QTMobility or QTLocation?

Looks like a typo in API reference. I'll get that fixed.  

 

The correct include is QtLocationSubset/… 

 

Take a look at https://github.com/blackberry/Cascades-Samples/tree/master/locationdiagnostics for an example.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.