Home > database >  How to do a geo-spital query on Firebase realtime database?
How to do a geo-spital query on Firebase realtime database?

Time:04-22

I have a coordinate stored in my MySQL database, and I have other multiple coordinates updating in the Firebase Realtime Database.

How can I find nearby coordinates from Firebase real-time database? Does Firebase Realtime Database allow GEO queries?

My Realtime Database structure is attached below:

enter image description here

CodePudding user response:

How can I find nearby coordinates from the Firebase Realtime database?

You definitely need to perform geo queries in order to get locations within a custom radius.

Does Firebase Realtime Database allow GEO queries?

No, it doesn't. To be able to achieve that, you have to use a library called GeoQuery.

If you consider at some point in time try using Cloud Firestore, then you can check the official documentation regarding geo queries. Are really well documented.

  • Related