I'm trying to get my head around GeoFire and I'm slightly confused into would GeoFire be suitable for what I'm trying to achieve.
I'm currently building a website (Angular 2, Typescript), this website allows users to sign up > create a profile and enter their location. This data is then stored within their profile as shown here:
The url to access this data is as follows:
https://my-website-f84a1.firebaseio.com/users<users auto generated key>/address
On the search page of this website, they can filter other users by given properties.
I then would like to sort the search results by closest first, which would be the following:
- Grab the location of the current user who is performing the search
- Then workout the distance of each user inside the search results against the location of the user who is performing the search then order by closest.
Seem's pretty straight forward right, well I'm confused and have some question.
- Would
GeoFirebe suitable for this? - Would I need to load all user locations on page load and store within the
geoFire?
I'm not to sure if my current database structure for storing the user address information is suitable for GeoFire but any help would be appreciated.
