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.

Markers

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.)

Directional Device Marker

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()).

Directionless Device Marker

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

Public Functions Index

GeoDeviceLocation (QObject *parent=0)
GeoDeviceLocation (const QString &id, QObject *parent=0)
virtual ~GeoDeviceLocation ()
bb::platform::geo::MarkerdeviceDirectionalMarker () const
bb::platform::geo::MarkerdeviceDirectionlessMarker () const
doubleheading () const
boolisHeadingValid () const
bb::platform::geo::Pointpoint () const
floatpointAccuracy () const
Q_SLOT voidresetDeviceDirectionalMarker ()
Q_SLOT voidresetDeviceDirectionlessMarker ()
Q_SLOT voidsetDeviceDirectionalMarker (const bb::platform::geo::Marker &marker)
Q_SLOT voidsetDeviceDirectionlessMarker (const bb::platform::geo::Marker &marker)
floatspeed () const
virtual bb::platform::geo::BoundingBoxboundingBox () const Inherited
QStringdescription () const Inherited
Geographic (QObject *parent=0)Inherited
Geographic (const QString &id, QObject *parent=0)Inherited
QStringgeoId () const Inherited
QStringid () const BB_DEPRECATEDInherited
QStringname () const Inherited
Q_SLOT voidsetDescription (const QString &desc)Inherited
Q_SLOT voidsetGeoId (const QString &id)Inherited
Q_SLOT voidsetId (const QString &id) BB_DEPRECATEDInherited
Q_SLOT voidsetName (const QString &name)Inherited
Q_SLOT voidsetStyleFamily (const QString &styleFamily)Inherited
QStringstyleFamily () const Inherited

Protected Functions Index

Only has inherited protected functions

voidsetBoundingBox (const bb::platform::geo::BoundingBox &newBox)Inherited

Signals Index

voiddeviceDirectionalMarkerChanged (const bb::platform::geo::Marker &newMarker)
voiddeviceDirectionlessMarkerChanged (const bb::platform::geo::Marker &newMarker)
voidheadingChanged (double heading)
voidheadingValidityChanged (bool headingValidity)
voidpointAccuracyChanged (float accuracy)
voidpointChanged (const bb::platform::geo::Point &point)
voidspeedChanged (float speed)
voidboundaryChanged (const bb::platform::geo::BoundingBox &box)Inherited
voiddescriptionChanged (const QString &desc)Inherited
voidgeoIdChanged (const QString &id)Inherited
voididChanged (const QString &id) BB_DEPRECATEDInherited
voidnameChanged (const QString &name)Inherited
voidstyleFamilyChanged (const QString &newFamily)Inherited
voidtopographyChanged (const QString &id)Inherited

Properties

bb::platform::geo::Marker deviceDirectionalMarker

The marker used to represent this location when it has a valid heading.

See Directional Device Marker for more information.

Since:

BlackBerry 10.2.0

bb::platform::geo::Marker deviceDirectionlessMarker

The marker used to represent this device's location when the heading of the device is invalid.

See Directionless Device Marker for more information.

Since:

BlackBerry 10.2.0

double heading[read-only]

The direction the device is heading, in degrees from true North.

Since:

BlackBerry 10.2.0

bool headingValid[read-only]

The validity of the heading property.

Since:

BlackBerry 10.2.0

bb::platform::geo::Point point[read-only]

The location of the device.

Since:

BlackBerry 10.2.0

float pointAccuracy[read-only]

The accuracy of the device's location, in meters, or a value less than 0 if the location is not valid.

Since:

BlackBerry 10.2.0

float speed[read-only]

The speed the device is traveling at, in meters/second.

Since:

BlackBerry 10.2.0

bb::platform::geo::BoundingBox boundingBoxInherited[read-only]

The axis-aligned bounding box in which this object is contained.

Since:

BlackBerry 10.0.0

QString descriptionInherited

The description of this object.

Since:

BlackBerry 10.0.0

QString geoIdInherited

The ID of this Geographic object.

Since:

BlackBerry 10.2.0

QString idInherited

Deprecated

Use the geoId property instead.

QString nameInherited

The name of this object.

Since:

BlackBerry 10.0.0

QString styleFamilyInherited

The style family to be used in conjunction with this element.

Since:

BlackBerry 10.2.0

Public Functions

GeoDeviceLocation (

Creates an instance of GeoDeviceLocation.

Parameters
parent

The QObject parent of this object.

Since:

BlackBerry 10.2.0

GeoDeviceLocation (

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.

Since:

BlackBerry 10.2.0

virtual~GeoDeviceLocation ()

Destructor.

Since:

BlackBerry 10.2.0

bb::platform::geo::Marker deviceDirectionalMarker ()

Retrieves the marker used to indicate this location when the device's heading is valid.

See Directional Device Marker for more information.

Return:

The device's marker when the heading is valid.

Since:

BlackBerry 10.2.0

bb::platform::geo::Marker deviceDirectionlessMarker ()

Retrieves the marker used to indicate this location when the device's heading is invalid.

See Directionless Device Marker for more information.

Return:

The device's marker when the heading is invalid.

Since:

BlackBerry 10.2.0

double heading ()

Retrieves the bearing to true north from the direction of travel, in degrees.

This property is undefined if headingValid is false.

Return:

The device's bearing.

Since:

BlackBerry 10.2.0

bool isHeadingValid ()

Determines if the heading property contains valid information.

Return:

true if the heading property contains valid information, false otherwise.

bb::platform::geo::Point point ()

Retrieves the point.

Since:

BlackBerry 10.2.0

float pointAccuracy ()

Retrieves the accuracy of the provided latitude-longitude values, in meters.

Return:

The accuracy.

Since:

BlackBerry 10.2.0

Q_SLOT void resetDeviceDirectionalMarker ()

Resets the directional marker to the default icon.

See Directional Device Marker for more information.

Since:

BlackBerry 10.2.0

Q_SLOT void resetDeviceDirectionlessMarker ()

Resets the directionless marker to the default icon.

See Directionless Device Marker for more information.

Since:

BlackBerry 10.2.0

Q_SLOT void setDeviceDirectionalMarker (

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.

Since:

BlackBerry 10.2.0

Q_SLOT void setDeviceDirectionlessMarker (

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.

Since:

BlackBerry 10.2.0

float speed ()

Retrieves the ground speed, in meters/sec.

Return:

The ground speed.

Since:

BlackBerry 10.2.0

virtualbb::platform::geo::BoundingBox boundingBox ()Inherited

Retrieves the axis-aligned bounding box for this Geographic.

Since:

BlackBerry 10.0.0

QString description ()Inherited

Gets the description of this Geographic.

Since:

BlackBerry 10.0.0

Geographic (Inherited

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.

Since:

BlackBerry 10.0.0

Geographic (Inherited

Constructor.

Parameters
id

The identifier for this Geographic.

parent

The parent of this Geographic.

Since:

BlackBerry 10.0.0

QString geoId ()Inherited

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.

Since:

BlackBerry 10.2.0

QString id ()Inherited

Deprecated

Use geoId() instead.

QString name ()Inherited

Gets the name of this Geographic.

Since:

BlackBerry 10.0.0

Q_SLOT void setDescription (Inherited

Sets the description of this Geographic.

Since:

BlackBerry 10.0.0

Q_SLOT void setGeoId (Inherited

Sets the ID of this Geographic.

Since:

BlackBerry 10.2.0

Q_SLOT void setId (Inherited

Deprecated

Use setGeoId() instead.

Q_SLOT void setName (Inherited

Sets the name of this Geographic.

Since:

BlackBerry 10.0.0

Q_SLOT void setStyleFamily (Inherited

Sets the style family for this Geographic.

Parameters
styleFamily

The new style family for this element.

Since:

BlackBerry 10.2.0

See also:

StyleSheet

QString styleFamily ()Inherited

Gets the style family for this Geographic.

Since:

BlackBerry 10.2.0

See also:

StyleSheet

Protected Functions

(Only has inherited protected functions)

void setBoundingBox (Inherited

Signals

void deviceDirectionalMarkerChanged (

Emitted when the directional marker changes.

See Directional Device Marker for more information.

Parameters
newMarker

The new marker.

Since:

BlackBerry 10.2.0

void deviceDirectionlessMarkerChanged (

Emitted when the directionless marker changes.

See Directionless Device Marker for more information.

Parameters
newMarker

The new marker.

Since:

BlackBerry 10.2.0

void headingChanged (
  • doubleheading)

Emitted when the device changes direction.

Parameters
heading

The new direction for the device.

Since:

BlackBerry 10.2.0

void headingValidityChanged (
  • boolheadingValidity)

Emitted when the heading's validity property changes.

Parameters
headingValidity

The new state of the heading's validity.

void pointAccuracyChanged (
  • floataccuracy)

Emitted when the accuracy of the device's location changes.

Parameters
accuracy

The location's new accuracy.

Since:

BlackBerry 10.2.0

void pointChanged (

Emitted when the device's location has changed.

Parameters
point

The new location for the device.

Since:

BlackBerry 10.2.0

void speedChanged (
  • floatspeed)

Emitted when the device's speed changes.

Parameters
speed

The device's new speed.

Since:

BlackBerry 10.2.0

void boundaryChanged (Inherited

Emitted by derived classes when the bounding box has changed.

See the BoundingBox documentation.

Since:

BlackBerry 10.0.0

void descriptionChanged (Inherited

Emitted when the description of this Geographic changes.

Since:

BlackBerry 10.0.0

void geoIdChanged (Inherited

Emitted when the ID of this Geographic changes.

Since:

BlackBerry 10.2.0

void idChanged (Inherited

Deprecated

Use geoIdChanged() instead.

void nameChanged (Inherited

Emitted when the name of this Geographic changes.

Since:

BlackBerry 10.0.0

void styleFamilyChanged (Inherited

Emitted when the style family attribute changes.

Since:

BlackBerry 10.2.0

void topographyChanged (Inherited

Emitted when the topography of this Geographic changes.

A Geographic's topography captures the location (or geographic) properties of the element.
Parameters
id

The ID of this Geographic.

Since:

BlackBerry 10.1.0

Last modified: 2014-03-13

comments powered by Disqus