GeoLocation

Since: BlackBerry 10.0.0

#include <bb/platform/geo/GeoLocation>

To link against this class, add the following line to your .pro file: LIBS += -lbbcascadesmaps

A location in geographic space that represents a latitude and longitude coordinate, and is visually represented on the map using its Marker attribute.

Note:

See Geographic for information on object ownership and reference types.


Overview

Inheritance

bb::platform::geo::Geographic
bb::platform::geo::GeoLocation

Public Functions Index

GeoLocation (const QString &id, QObject *parent=0)
GeoLocation (double lat=0, double lon=0, QObject *parent=0)
GeoLocation (const QString &id, const QString &name, const bb::platform::geo::Point &location, QObject *parent=0)
virtual ~GeoLocation ()
doublealtitude () const
bb::platform::geo::AltitudeMode::TypealtitudeMode () const
virtual bb::platform::geo::BoundingBoxboundingBox () const
doublelatitude () const
doublelongitude () const
bb::platform::geo::Markermarker () const
bb::platform::geo::Pointpoint () const
doubleradius () const
Q_SLOT voidresetMarker ()
Q_SLOT voidresetRadius ()
boolsetAltitude (double alt)
boolsetAltitudeMode (bb::platform::geo::AltitudeMode::Type mode)
boolsetLatitude (double lat)
boolsetLongitude (double lon)
Q_SLOT voidsetMarker (const bb::platform::geo::Marker &marker)
boolsetPoint (const bb::platform::geo::Point &point)
boolsetRadius (double newRadius)
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

voidmarkerChanged (const bb::platform::geo::Marker &newMarker)
voidpointChanged (const bb::platform::geo::Point &point)
voidradiusChanged (double newRadius)
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 marker

The marker used to indicate this location.

Since:

BlackBerry 10.0.0

bb::platform::geo::Point point

The coordinates of this location.

Since:

BlackBerry 10.0.0

double radius

The radius of interest of the circle that represents this location.

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

GeoLocation (

Creates an instance of GeoLocation.

The resulting location defaults to that of a default Point.

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

GeoLocation (
  • doublelat,
  • doublelon,
  • QObject *parent )

Creates an instance of GeoLocation with the given latitude and longitude.

Parameters
lat

The latitude value (0 default).

lon

The longitude value (0 default).

parent

The QObject parent of this object.

Since:

BlackBerry 10.0.0

GeoLocation (

Creates an instance of GeoLocation with the information provided.

Parameters
id

The identifier for this Geographic. It is up to the caller to ensure the uniqueness of Geographic IDs.

name

The name of this location.

location

The location of this Point.

parent

The QObject parent of this object.

Since:

BlackBerry 10.0.0

virtual~GeoLocation ()

Destructor.

double altitude ()

Gets the altitude of this Point in meters.

Since:

BlackBerry 10.0.0

bb::platform::geo::AltitudeMode::Type altitudeMode ()

Captures how the altitude attribute should be interpreted.

The default value is AltitudeMode::RelativeToGround.

Return:

How the altitude property should be interpreted.

Since:

BlackBerry 10.0.0

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

Retrieves the axis-aligned bounding box for this Geographic.

Since:

BlackBerry 10.0.0

double latitude ()

Gets the point's latitude in degrees.

Since:

BlackBerry 10.0.0

double longitude ()

Gets the point's longitude in degrees.

Since:

BlackBerry 10.0.0

bb::platform::geo::Marker marker ()

Retrieves the marker, or icon, used to indicate this location.

Return:

The location's marker.

Since:

BlackBerry 10.0.0

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

Retrieves all point-based attributes of this location.

Return:

A Point version of this location.

Since:

BlackBerry 10.0.0

double radius ()

The radius of interest of this location.

Return:

The radius of interest of this location.

Since:

BlackBerry 10.2.0

Q_SLOT void resetMarker ()

Resets the marker to the default icon, the blue pin.

Since:

BlackBerry 10.0.0

Q_SLOT void resetRadius ()

Resets the radius of interest of this location to 0 meters.

Since:

BlackBerry 10.2.0

bool setAltitude (
  • doublealt)

Sets the altitude of this Point in meters.

Return:

true if the operation resulted in a change.

Since:

BlackBerry 10.0.0

bool setAltitudeMode (

Sets the altitude mode.

The altitude measurement can be relative to the ground (default) or the sea level.

Since:

BlackBerry 10.0.0

Return:

true if the attribute changed.

Since:

BlackBerry 10.0.0

bool setLatitude (
  • doublelat)

Sets the point's latitude in degrees.

Return:

true if operation resulted in a change.

Since:

BlackBerry 10.0.0

bool setLongitude (
  • doublelon)

Sets the point's longitude in degrees.

Return:

true if operation resulted in a change.

Since:

BlackBerry 10.0.0

Q_SLOT void setMarker (

Sets the marker, or icon, used to indicate this location.

Parameters
marker

The new marker.

Since:

BlackBerry 10.0.0

bool setPoint (

Sets all point-based attributes of this location.

Return:

true if operation resulted in a change.

Since:

BlackBerry 10.0.0

bool setRadius (
  • doublenewRadius)

Sets the radius of interest of this location.

Parameters
newRadius

The new radius value for this location.

Return:

true if this location's radius has changed.

Since:

BlackBerry 10.2.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 markerChanged (

Emitted when the marker changes.

Since:

BlackBerry 10.0.0

void pointChanged (

Emitted when the point of this location changes.

Since:

BlackBerry 10.0.0

void radiusChanged (
  • doublenewRadius)

Emitted when the radius of interest has changed.

Parameters
newRadius

The new radius of this location.

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