Wt: Wt::WGoogleMap::Coordinate Class Reference

Wt 4.10.4

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Wt::WGoogleMap::Coordinate Class Reference

A geographical coordinate (latitude/longitude) More...

`#include <WGoogleMap.h>`

## Public Member Functions
| Coordinate ()
| Default constructor.
| Coordinate (double latitude, double longitude)
| Creates with given latitude and longitude.
void | setLatitude (double latitude)
| Sets the latitude.
void | setLongitude (double longitude)
| Sets the longitude.
double | latitude () const
| Returns the latitude.
double | longitude () const
| Returns the longitude.
double | distanceTo (const Coordinate &rhs) const
| Calculates the distance between two points in km (approximate).
std::pair< double, double > | operator() () const
| Conversion operator to pair of double.

## Detailed Description

A geographical coordinate (latitude/longitude)

## Member Function Documentation

## ◆ distanceTo()

double Wt::WGoogleMap::Coordinate::distanceTo | ( | const Coordinate & | rhs | ) | const

Calculates the distance between two points in km (approximate).

The calculation uses a sphere. Results can be out by 0.3%.