Location Class
Represents a location update from a position source. More...
Header: | #include <Location> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherited By: |
This class was introduced in Esri::ArcGISRuntime 100.0.
Public Functions
Location(Esri::ArcGISRuntime::Location &&other) | |
Location(const Esri::ArcGISRuntime::Location &other) | |
Location(const Esri::ArcGISRuntime::Point &position, double horizontalAccuracy, double velocity, double course, bool lastKnown) | |
Location(const QDateTime ×tamp, const Esri::ArcGISRuntime::Point &position, double horizontalAccuracy, double verticalAccuracy, double velocity, double course, bool lastKnown) | |
Esri::ArcGISRuntime::Location & | operator=(Esri::ArcGISRuntime::Location &&other) |
Esri::ArcGISRuntime::Location & | operator=(const Esri::ArcGISRuntime::Location &other) |
virtual | ~Location() |
double | course() const |
double | horizontalAccuracy() const |
bool | isEmpty() const |
bool | isLastKnown() const |
Esri::ArcGISRuntime::LocationType | locationType() const |
Esri::ArcGISRuntime::Point | position() const |
QDateTime | timestamp() const |
double | velocity() const |
double | verticalAccuracy() const |
Detailed Description
See also LocationDisplay.
Member Function Documentation
Location::Location(Esri::ArcGISRuntime::Location &&other)
Move constructor from other Location.
Location::Location(const Esri::ArcGISRuntime::Location &other)
Copy constructor from other Location.
Location::Location(const Esri::ArcGISRuntime::Point &position, double horizontalAccuracy, double velocity, double course, bool lastKnown)
Creates a location object.
- position - A Point geometry object.
- horizontalAccuracy - The horizontal accuracy in meters. Positive values or
NaN
are supported. - velocity - The location's velocity in meters per second.
- course - The location's course in degrees (clockwise),
0
being true North. - lastKnown - Whether this location is the last knwon position or an up-to-date reading.
Location::Location(const QDateTime ×tamp, const Esri::ArcGISRuntime::Point &position, double horizontalAccuracy, double verticalAccuracy, double velocity, double course, bool lastKnown)
Creates a location object with timestamp.
- timestamp - A timestamp when the location was received.
- position - A Point geometry object.
- horizontalAccuracy - The horizontal accuracy in meters. Positive values or
NaN
are supported. - verticalAccuracy - The vertical accuracy in meters. Positive values or
NaN
are supported. - velocity - The location's velocity in meters per second.
- course - The location's course in degrees (clockwise),
0
being true North. - lastKnown - Whether this location is the last knwon position or an up-to-date reading.
This function was introduced in Esri::ArcGISRuntime 100.8.
Esri::ArcGISRuntime::Location &Location::operator=(Esri::ArcGISRuntime::Location &&other)
Move operator from other Location.
Esri::ArcGISRuntime::Location &Location::operator=(const Esri::ArcGISRuntime::Location &other)
Assignment operator from other Location.
[virtual]
Location::~Location()
Destructor.
double Location::course() const
Gets the direction in which the device is traveling.
The direction is measured in degrees starting at due north and continuing clockwise around the compass. Thus, north is 0 degrees, east is 90 degrees, south is 180 degrees, and so on. Course values may not be available on all devices. A negative value indicates that the direction is invalid.
This property will return NaN
when the object is empty.
double Location::horizontalAccuracy() const
Gets the radius of uncertainty for the location, measured in meters.
The position identifies the center of the circle, and this value indicates the radius of that circle. A negative value indicates that the position is invalid.
This property will return NaN
when the object is empty.
bool Location::isEmpty() const
Returns true
if this Location is empty.
bool Location::isLastKnown() const
Gets whether the location information is current or based on a last known update.
Returns true
if it is based on last known update. It is considered to be of last known update once the LocationDisplay::acquiringTimeout has passed without an update.
In the case of an empty Location, this will return false.
Esri::ArcGISRuntime::LocationType Location::locationType() const
Returns the type of the location.
This property will return Unknown
when the object is empty.
This function was introduced in Esri::ArcGISRuntime 100.10.
See also LocationType.
Esri::ArcGISRuntime::Point Location::position() const
Gets the coordinates of the position as a Point.
This property will return a default constructed Point when the object is empty.
QDateTime Location::timestamp() const
The time this location was observed.
This property will return a default constructed QDateTime when the object is empty.
This function was introduced in Esri::ArcGISRuntime 100.8.
double Location::velocity() const
Gets the instantaneous speed of the device in meters per second.
This property will return NaN
when the object is empty.
double Location::verticalAccuracy() const
The vertical accuracy of the location in meters.
This property will return NaN
when the object is empty.
This function was introduced in Esri::ArcGISRuntime 100.8.