[null,null,["Last updated 2024-01-23 UTC."],[],[],null,["firebase::firestore::GeoPoint\n\n\n`#include \u003cgeo_point.h\u003e`\n\nAn immutable object representing a geographical point in [Firestore](/docs/reference/cpp/class/firebase/firestore/firestore#classfirebase_1_1firestore_1_1_firestore).\n\nSummary\n\nThe point is represented as a latitude/longitude pair.\n\nLatitude values are in the range of \\[-90, 90\\]. Longitude values are in the range of \\[-180, 180\\].\n\nPublic functions \n\nGeoPoint \n\n```c++\n GeoPoint()=default\n``` \nCreates a [GeoPoint](/docs/reference/cpp/class/firebase/firestore/geo-point#classfirebase_1_1firestore_1_1_geo_point) with both latitude and longitude set to 0. \n\nGeoPoint \n\n```c++\n GeoPoint(\n double latitude,\n double longitude\n)\n``` \nCreates a [GeoPoint](/docs/reference/cpp/class/firebase/firestore/geo-point#classfirebase_1_1firestore_1_1_geo_point) from the provided latitude and longitude values.\n\n\u003cbr /\u003e\n\nGeoPoint \n\n```c++\n GeoPoint(\n const GeoPoint & other\n)=default\n``` \nCopy constructor, [GeoPoint](/docs/reference/cpp/class/firebase/firestore/geo-point#classfirebase_1_1firestore_1_1_geo_point) is trivially copyable. \n\nGeoPoint \n\n```c++\n GeoPoint(\n GeoPoint && other\n)=default\n``` \nMove constructor, equivalent to copying. \n\nToString \n\n```c++\nstd::string ToString() const \n``` \nReturns a string representation of this [GeoPoint](/docs/reference/cpp/class/firebase/firestore/geo-point#classfirebase_1_1firestore_1_1_geo_point) for logging/debugging purposes.\n\n\n| **Note:** : the exact string representation is unspecified and subject to change; don't rely on the format of the string.\n\n\u003cbr /\u003e\n\nlatitude \n\n```c++\ndouble latitude() const \n``` \nReturns the latitude value of this [GeoPoint](/docs/reference/cpp/class/firebase/firestore/geo-point#classfirebase_1_1firestore_1_1_geo_point). \n\nlongitude \n\n```c++\ndouble longitude() const \n``` \nReturns the latitude value of this [GeoPoint](/docs/reference/cpp/class/firebase/firestore/geo-point#classfirebase_1_1firestore_1_1_geo_point). \n\noperator= \n\n```c++\nGeoPoint & operator=(\n const GeoPoint & other\n)=default\n``` \nCopy assignment operator, [GeoPoint](/docs/reference/cpp/class/firebase/firestore/geo-point#classfirebase_1_1firestore_1_1_geo_point) is trivially copyable. \n\noperator= \n\n```c++\nGeoPoint & operator=(\n GeoPoint && other\n)=default\n``` \nMove assignment operator, equivalent to copying.\n\nFriend classes \n\noperator\\\u003c\\\u003c \n\n```c++\nfriend std::ostream & operator\u003c\u003c(std::ostream &out, const GeoPoint &geo_point)\n``` \nOutputs the string representation of this [GeoPoint](/docs/reference/cpp/class/firebase/firestore/geo-point#classfirebase_1_1firestore_1_1_geo_point) to the given stream.\n\n**See also:** [ToString()](/docs/reference/cpp/class/firebase/firestore/geo-point#classfirebase_1_1firestore_1_1_geo_point_1ab4704568b6f925a4fcc825cce5285d58) for comments on the representation format."]]