Skip to content
Advertisement

accessing GeoPoint data from firestore document

I’m using react native and have firestore structured like this. and i want access the geopoint latitude and longitude. how do i do that? sorry i’m still newbie

JavaScript

i’m getting error with this code

JavaScript

Advertisement

Answer

Firestore GeoPoint is not an array; it’s an object

you can access the lat & long using their field names, like below

JavaScript
Advertisement