firebase:: firestore:: GeoPoint
#include <geo_point.h>
An immutable object representing a geographical point inFirestore.
Summary
The point is represented as a latitude/longitude pair.
Latitude values are in the range of [-90, 90]. Longitude values are in the range of [-180, 180].
Constructors and Destructors | |
|---|---|
GeoPoint()Creates a GeoPoint with both latitude and longitude set to 0. | |
GeoPoint(double latitude, double longitude)Creates a GeoPoint from the provided latitude and longitude values. | |
GeoPoint(constGeoPoint & other)Copy constructor, GeoPoint is trivially copyable. | |
GeoPoint(GeoPoint && other)Move constructor, equivalent to copying. |
Public functions | |
|---|---|
ToString() const | std::stringReturns a string representation of this GeoPoint for logging/debugging purposes. |
latitude() const | doubleReturns the latitude value of this GeoPoint. |
longitude() const | doubleReturns the latitude value of this GeoPoint. |
operator=(constGeoPoint & other)=default | GeoPoint &Copy assignment operator, GeoPoint is trivially copyable. |
operator=(GeoPoint && other)=default | GeoPoint &Move assignment operator, equivalent to copying. |
Friend classes | |
|---|---|
operator<< | friend std::ostream &Outputs the string representation of this GeoPoint to the given stream. |
Public functions
GeoPoint
GeoPoint(doublelatitude,doublelongitude)
Creates aGeoPoint from the provided latitude and longitude values.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
ToString
std::stringToString()const
Returns a string representation of thisGeoPoint for logging/debugging purposes.
operator=
GeoPoint&operator=(constGeoPoint&other)=default
Copy assignment operator,GeoPoint is trivially copyable.
operator=
GeoPoint&operator=(GeoPoint&&other)=default
Move assignment operator, equivalent to copying.
Friend classes
operator<<
friendstd::ostream&operator<<(std::ostream&out,constGeoPoint&geo_point)
Outputs the string representation of thisGeoPoint to the given stream.
See also:ToString() for comments on the representation format.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.