RBB-Website
RBB-Website copied to clipboard
[Feature] Leverage the Geolocation API
User Story
As a user I want to allow RBB to use my IP location So I can view businesses near me
Acceptance Criteria
- [ ] Add a geolocation icon to any "zipcode" input field, this will act as the trigger for the following items
- [ ] Leverage the Geolocation API in order to prompt user allowing RBB to get their location
- [ ] Use geolocation data to set the default search results based on that data
- [ ] There is a button near the filters that will trigger the Geolocation API functionality asking for user location.
- [ ] There is a tooltip that appears when hovering the button, which explains why we are getting your location
- [ ] Results that are shown are accurate based on the user's location
Describe the solution you'd like
We need to add a button within the filters that will trigger the Geolocation API to get the users location, and update the search results based on that location.
We will need to be sure that the Geolocation data that is passed to the API is a latitude and longitude.
Looking good to me, I don't think I have much more to add. Just needs designs and I recon this can get started asap :)
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {/* do something */})
}
Hi, can I be assigned to this task?
@sonAndrew - apologies for the delay! Thanks for picking this up!