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

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



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alex Mamo