Closed namanarora00 closed 5 years ago
The goepoint and geohash aren't docs intended for you to have access to, geofiretore is designed to wrap the data you give when it inserts it into firestore and return only the data you gave us when you query from it. So it'll only return the d
data. If you're looking for the geopoint, it's wherever you stored it originally in your doc/data/d
. (Hopefully I was clear here, if not let me know)
Thank you for your response! So the way you're suggesting or the way it was intended to be done in the first place is I have to store the geopoint twice in one document. Once in d
field and the other in the l
field. Wouldn't it be better if I could access the geopoint stored in the l
field itself to remove the redundancy of storing the same data twice?
My reason for avoiding that is I didn't want to give access to what make geofirestore work under the hood. If the user modifies either the g
or l
and it doesn't update everything it could negatively impact performance. However I'm open to making the change in a newer version.
The
data
function returns only thed
field of the document. There seems to be no way of getting the geopoint of the document or am I missing something?