|
MoSync 3.2.1
|
This class maintains a coordinate in latitude / longitude, and provides conversion function to and from other coordinate systems. More...
#include <MAP/LonLat.h>
Public Member Functions | |
| LonLatT () | |
| LonLatT (const double _lon, const double _lat) | |
| LonLatT (const PixelCoordinateT< MagnificationT > &px) | |
| bool | isValid () const |
| const PixelCoordinateT < MagnificationT > | toPixels (MagnificationT magnification) const |
| void | toMeters (double &meterX, double &meterY) const |
Static Public Member Functions | |
| static LonLatT< MagnificationT > | fromMeters (const double meterX, const double meterY) |
Public Attributes | |
| double | lon |
| double | lat |
This class maintains a coordinate in latitude / longitude, and provides conversion function to and from other coordinate systems.
| MAP::LonLatT< MagnificationT >::LonLatT | ( | ) | [inline] |
Creates a LonLat initialized to (0, 0).
| MAP::LonLatT< MagnificationT >::LonLatT | ( | const double | _lon, |
| const double | _lat | ||
| ) | [inline] |
Creates a LonLat.
| MAP::LonLatT< MagnificationT >::LonLatT | ( | const PixelCoordinateT< MagnificationT > & | px | ) | [inline] |
Creates a LonLat from thr given global pixel coordinate.
| static LonLatT<MagnificationT> MAP::LonLatT< MagnificationT >::fromMeters | ( | const double | meterX, |
| const double | meterY | ||
| ) | [inline, static] |
Creates a LonLat from the given global meter coordinates.
| bool MAP::LonLatT< MagnificationT >::isValid | ( | ) | const [inline] |
| const PixelCoordinateT<MagnificationT> MAP::LonLatT< MagnificationT >::toPixels | ( | MagnificationT | magnification | ) | const [inline] |
Converts this to global pixel coordinates. Projection is assumed to be spherical Mercator (as opposed to ellipsoidal). This results in a slight Y-axis error. Spherical Mercator is chosen for compatibility with online tile servers such as Google Maps and Microsoft Virtual Earth.
| void MAP::LonLatT< MagnificationT >::toMeters | ( | double & | meterX, |
| double & | meterY | ||
| ) | const [inline] |
Convert this to meters.
| double MAP::LonLatT< MagnificationT >::lon |
Longitude
Referenced by MAP::LonLatT< MagnificationType >::fromMeters().
| double MAP::LonLatT< MagnificationT >::lat |
Latitude
Referenced by MAP::LonLatT< MagnificationType >::fromMeters().