GeoDeviceLocation
Since: BlackBerry 10.2.0
#include <bb/platform/geo/GeoDeviceLocation>
To link against this class, add the following line to your .pro file: LIBS += -lbbcascadesmaps
A point in geographic space that represents the device's current latitude and longitude coordinates.
The GeoDeviceLocation class uses Markers to indicate the device's current location on the map. It has two Marker properties, one used when the device has a valid heading, the other used when the device doesn't have a valid heading. Only one marker property is displayed at a time, depending on the headingValid property.
If no markers are provided, default ones will be used. (The defaults can be restored using the reset* operations.)
The deviceDirectionalMarker property is the Marker that is used to visually represent the device's location on a map when the direction of the device is known.
The icon for the marker is expected to point North initially, and is rotated in accordance with the device's heading. For example, if the heading is 90 degrees, then the icon is rotated a quarter turn to the right. The icon is rotated around the marker's "location coordinate" attribute (Marker::locationCoordinate()).
The deviceDirectionlessMarker property is the Marker that is used to visually represent the device's location on a map when the direction of the device is not known.
This marker is not rotated since it does not represent directionality.
Overview
Inheritance
bb::platform::geo::Geographic | ||
bb::platform::geo::GeoDeviceLocation |
Properties Index
bb::platform::geo::Marker | deviceDirectionalMarker |
bb::platform::geo::Marker | deviceDirectionlessMarker |
double | heading [read-only] |
bool | headingValid [read-only] |
bb::platform::geo::Point | point [read-only] |
float | pointAccuracy [read-only] |
float | speed [read-only] |
bool | valid [read-only] |
bb::platform::geo::BoundingBox | boundingBox [read-only]![]() |
QString | description![]() |
QString | geoId![]() |
QString | id![]() |
QString | name![]() |
QString | styleFamily![]() |
Public Functions Index
GeoDeviceLocation (QObject *parent=0) | |
GeoDeviceLocation (const QString &id, QObject *parent=0) | |
virtual | ~GeoDeviceLocation () |
bb::platform::geo::Marker | deviceDirectionalMarker () const |
bb::platform::geo::Marker | deviceDirectionlessMarker () const |
double | heading () const |
bool | isHeadingValid () const |
bool | isValid () const |
bb::platform::geo::Point | point () const |
float | pointAccuracy () const |
Q_SLOT void | resetDeviceDirectionalMarker () |
Q_SLOT void | resetDeviceDirectionlessMarker () |
Q_SLOT void | setDeviceDirectionalMarker (const bb::platform::geo::Marker &marker) |
Q_SLOT void | setDeviceDirectionlessMarker (const bb::platform::geo::Marker &marker) |
float | speed () const |
virtual bb::platform::geo::BoundingBox | boundingBox () const ![]() |
QString | description () const ![]() |
Geographic (QObject *parent=0)![]() | |
Geographic (const QString &id, QObject *parent=0)![]() | |
QString | geoId () const ![]() |
QString | id () const BB_DEPRECATED![]() |
QString | name () const ![]() |
Q_SLOT void | setDescription (const QString &desc)![]() |
Q_SLOT void | setGeoId (const QString &id)![]() |
Q_SLOT void | setId (const QString &id) BB_DEPRECATED![]() |
Q_SLOT void | setName (const QString &name)![]() |
Q_SLOT void | setStyleFamily (const QString &styleFamily)![]() |
QString | styleFamily () const ![]() |
Protected Functions Index
Only has inherited protected functions
void | setBoundingBox (const bb::platform::geo::BoundingBox &newBox)![]() |
Signals Index
void | deviceDirectionalMarkerChanged (const bb::platform::geo::Marker &newMarker) |
void | deviceDirectionlessMarkerChanged (const bb::platform::geo::Marker &newMarker) |
void | headingChanged (double heading) |
void | headingValidityChanged (bool headingValidity) |
void | pointAccuracyChanged (float accuracy) |
void | pointChanged (const bb::platform::geo::Point &point) |
void | speedChanged (float speed) |
void | validChanged (bool valid) |
void | boundaryChanged (const bb::platform::geo::BoundingBox &box)![]() |
void | descriptionChanged (const QString &desc)![]() |
void | geoIdChanged (const QString &id)![]() |
void | idChanged (const QString &id) BB_DEPRECATED![]() |
void | nameChanged (const QString &name)![]() |
void | styleFamilyChanged (const QString &newFamily)![]() |
void | topographyChanged (const QString &id)![]() |
Properties
bb::platform::geo::Marker
The marker used to represent this location when it has a valid heading.
BlackBerry 10.2.0
bb::platform::geo::Marker
The marker used to represent this device's location when the heading of the device is invalid.
See Directionless Device Marker for more information.
BlackBerry 10.2.0
double
The direction the device is heading, in degrees from true North.
BlackBerry 10.2.0
bool
The validity of the heading property.
The heading property can be invalid while the GeoDeviceLocation is valid in the case where the device is not moving.
BlackBerry 10.2.0
float
The accuracy of the device's location, in meters, or a value less than 0 if the location is not valid.
BlackBerry 10.2.0
float
The speed the device is traveling at, in meters/second.
BlackBerry 10.2.0
bool
The validity of the device's location.
The device has a valid location when it has received a location update from a location source.
BlackBerry 10.3.0
bb::platform::geo::BoundingBox
The axis-aligned bounding box in which this object is contained.
BlackBerry 10.0.0
QString
Use the geoId property instead.
Public Functions
Creates an instance of GeoDeviceLocation.
Parameters | |
---|---|
parent |
The QObject parent of this object. |
BlackBerry 10.2.0
Creates an instance of GeoDeviceLocation.
Parameters | |
---|---|
id |
The identifier for this Geographic. It is up to the caller to ensure the uniqueness of Geographic IDs. |
parent |
The QObject parent of this object. |
BlackBerry 10.2.0
virtual
Destructor.
BlackBerry 10.2.0
bb::platform::geo::Marker
Retrieves the marker used to indicate this location when the device's heading is valid.
See Directional Device Marker for more information.
The device's marker when the heading is valid.
BlackBerry 10.2.0
bb::platform::geo::Marker
Retrieves the marker used to indicate this location when the device's heading is invalid.
See Directionless Device Marker for more information.
The device's marker when the heading is invalid.
BlackBerry 10.2.0
double
Retrieves the bearing to true north from the direction of travel, in degrees.
This property is undefined if headingValid is false.
The device's bearing.
BlackBerry 10.2.0
bool
Determines if the heading property contains valid information.
true if the heading property contains valid information, false otherwise.
BlackBerry 10.2.0
bool
Retrieves the validity of the device's location.
true if the device's location is valid, false otherwise.
BlackBerry 10.3.0
float
Retrieves the accuracy of the provided latitude-longitude values, in meters.
The accuracy.
BlackBerry 10.2.0
Q_SLOT void
Resets the directional marker to the default icon.
See Directional Device Marker for more information.
BlackBerry 10.2.0
Q_SLOT void
Resets the directionless marker to the default icon.
See Directionless Device Marker for more information.
BlackBerry 10.2.0
Q_SLOT void
Sets the marker used to indicate this location when the device's heading is valid.
See Directional Device Marker for more information.
Parameters | |
---|---|
marker |
The new marker. |
BlackBerry 10.2.0
Q_SLOT void
Sets the marker used to indicate this location when the device's heading is invalid.
See Directionless Device Marker for more information.
Parameters | |
---|---|
marker |
The new marker. |
BlackBerry 10.2.0
float
Retrieves the ground speed, in meters/sec.
The ground speed.
BlackBerry 10.2.0
virtualbb::platform::geo::BoundingBox 
Retrieves the axis-aligned bounding box for this Geographic.
BlackBerry 10.0.0
Constructor.
If no ID is supplied when constructing a Geographic entity, an ID that is guaranteed to be unique will be auto-generated.
Parameters | |
---|---|
parent |
The parent of this Geographic. |
BlackBerry 10.0.0
Constructor.
Parameters | |
---|---|
id |
The identifier for this Geographic. |
parent |
The parent of this Geographic. |
BlackBerry 10.0.0
QString 
Gets the unique identifier for this Geographic.
If two Geographics are attribute-wise equal, they still need to have different IDs. The ID needs to be unique within a process.
BlackBerry 10.2.0
Q_SLOT void 
Use setGeoId() instead.
Q_SLOT void 
Sets the style family for this Geographic.
Parameters | |
---|---|
styleFamily |
The new style family for this element. |
BlackBerry 10.2.0
Protected Functions
(Only has inherited protected functions)
void 
Signals
void
Emitted when the directional marker changes.
See Directional Device Marker for more information.
Parameters | |
---|---|
newMarker |
The new marker. |
BlackBerry 10.2.0
void
Emitted when the directionless marker changes.
See Directionless Device Marker for more information.
Parameters | |
---|---|
newMarker |
The new marker. |
BlackBerry 10.2.0
void
Emitted when the device changes direction.
Parameters | |
---|---|
heading |
The new direction for the device. |
BlackBerry 10.2.0
void
Emitted when the heading's validity property changes.
Parameters | |
---|---|
headingValidity |
The new state of the heading's validity. |
BlackBerry 10.2.0
void
Emitted when the accuracy of the device's location changes.
Parameters | |
---|---|
accuracy |
The location's new accuracy. |
BlackBerry 10.2.0
void
Emitted when the device's location has changed.
Parameters | |
---|---|
point |
The new location for the device. |
BlackBerry 10.2.0
void
Emitted when the device's speed changes.
Parameters | |
---|---|
speed |
The device's new speed. |
BlackBerry 10.2.0
void
Emitted when the validity of the device's location changes.
Parameters | |
---|---|
valid |
true if the device's location has become valid, false if the device's location has become invalid. |
BlackBerry 10.3.0
void 
Emitted by derived classes when the bounding box has changed.
See the BoundingBox documentation.
BlackBerry 10.0.0
void 
Use geoIdChanged() instead.
void 
Emitted when the style family attribute changes.
BlackBerry 10.2.0
void 
Emitted when the topography of this Geographic changes.
Parameters | |
---|---|
id |
The ID of this Geographic. |
BlackBerry 10.1.0