Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the new 'Cloud Firestore' able to query based location distance?

I know Cloud Firestore stores locations based on latitude and longitude in Geopoints. However, I can't find a method or a way documented to query documents based on the distance to a certain point, kind of what GeoFire does for the Realtime database.

Is there a way to achieve that?

like image 682
Chris Roe Avatar asked Oct 05 '17 07:10

Chris Roe


People also ask

Does cloud firestore location matter?

Before you use Cloud Firestore, you must choose a location for your database. To reduce latency and increase availability, store your data close to the users and services that need it. This location setting is your project's default Google Cloud Platform (GCP) resource location.

How do I store my geolocation on firestore?

Saving Geolocation Data in FirestoreYou name the object whatever you want and save multiple points on a single document. The library provides a the point method to help you create this data. If updating an existing doc, you can use setPoint(id, lat, lng) to non-destructively update the document.

What is the difference between cloud firestore and Realtime Database?

Cloud Firestore is Firebase's newest database for mobile app development. It builds on the successes of the Realtime Database with a new, more intuitive data model. Cloud Firestore also features richer, faster queries and scales further than the Realtime Database. Realtime Database is Firebase's original database.


1 Answers

It's something we're looking into, but isn't supported at this time.

like image 94
Dan McGrath Avatar answered Oct 11 '22 07:10

Dan McGrath