Coordinate

Since: BlackBerry 10.2.0

#include <bb/platform/geo/Coordinate>

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

A Coordinate in geographic space that is represented by latitude, longitude and altitude components.

Validity

A Coordinate is considered valid when all of its attributes are set. If a Coordinate is invalid, its attributes are undefined.

World Coordinate Reference

Coordinates are stated using the WGS84 reference coordinate system. A Coordinate's altitude is interpreted based on context in which it is being used, via AltitudeMode, as in various classes such as Point, GeoLocation, GeoShape, etc.


Overview

Public Functions Index

Coordinate ()
Coordinate (double lat, double lon, double altitude=0)
Coordinate (const Coordinate &src)
~Coordinate ()
doublealtitude () const
BoundingBoxboundingBox () const
voidinvalidate ()
boolisValid () const
doublelatitude () const
doublelongitude () const
booloperator!= (const Coordinate &rhs) const
Coordinate &operator= (const Coordinate &src)
booloperator== (const Coordinate &rhs) const
boolset (double lat, double lon)
boolset (double lat, double lon, double alt)
boolsetAltitude (double alt)
boolsetLatitude (double lat)
boolsetLongitude (double lon)

Public Functions

Coordinate ()

Creates an invalid Coordinate.

Since:

BlackBerry 10.2.0

Coordinate (
  • doublelat,
  • doublelon,
  • doublealtitude )

Creates a valid Coordinate instance.

Parameters
lat

The latitude value.

lon

The longitude value.

altitude

The altitude value (0 default).

Since:

BlackBerry 10.2.0

Coordinate (

Copy constructor.

Parameters
src

The object from which to copy information.

Since:

BlackBerry 10.2.0

~Coordinate ()

Destructor.

Since:

BlackBerry 10.2.0

double altitude ()

Gets the altitude of this coordinate in meters.

Since:

BlackBerry 10.2.0

BoundingBox boundingBox ()

The bounding box of this coordinate.

Return:

The bounding box of this Coordinate.

Since:

BlackBerry 10.2.0

void invalidate ()

Invalidates this Coordinate.

Since:

BlackBerry 10.2.0

bool isValid ()

Indicates whether this Coordinate contains valid information.

Return:

true if this instance is in a valid state, false otherwise.

Since:

BlackBerry 10.2.0

double latitude ()

Retrieves the coordinate's latitude.

Since:

BlackBerry 10.2.0

double longitude ()

Gets the coordinate's longitude.

Since:

BlackBerry 10.2.0

bool operator!= (

Inequality operator.

Return:

true if any property is not equal.

Since:

BlackBerry 10.2.0

Coordinate & operator= (

Assignment operator.

Parameters
src

The object from which to copy information.

Since:

BlackBerry 10.2.0

bool operator== (

Equality operator.

Return:

true if all properties are equal.

Since:

BlackBerry 10.2.0

bool set (
  • doublelat,
  • doublelon )

Convenience method to set latitude, longitude.

This operation does not change the altitude.

Parameters
lat

The new latitude.

lon

The new longitude.

Return:

true if the operation resulted in a change.

Since:

BlackBerry 10.2.0

bool set (
  • doublelat,
  • doublelon,
  • doublealt )

Convenience method to set latitude, longitude and altitude.

Parameters
lat

The new latitude.

lon

The new longitude.

alt

The new altitude.

Return:

true if the operation resulted in a change.

Since:

BlackBerry 10.2.0

bool setAltitude (
  • doublealt)

Sets the altitude of this coordinate in meters.

Return:

true if the operation resulted in a change.

Since:

BlackBerry 10.2.0

bool setLatitude (
  • doublelat)

Sets the coordinate's latitude.

Return:

true if the operation resulted in a change.

Since:

BlackBerry 10.2.0

bool setLongitude (
  • doublelon)

Sets the coordinate's longitude.

Return:

true if the operation resulted in a change.

Since:

BlackBerry 10.2.0

Last modified: 2014-03-13

comments powered by Disqus