Created button that updates user location whenever position changes. When outside of a search zone, button is disabled and displays "Not in Search Zone". When within the search zone of the nearest POI, button activates and displays "Want distance to POI?". Clicking button shows the continuously-updating distance in meters.
[X] New feature (non-breaking change which adds functionality)
[X] This change requires a documentation update
How Has This Been Tested?
Coordinate-related math tests are in tests/utils folder (end-to-end testing tbd)
Button function tested manually in developer tools.
To test while not moving, go to developer tools > settings (3 dots) > more tools > sensors. Under location, sample cities or setting custom latitude/longitudes is possible.
Checklist before requesting a review
[X] I have performed a self-review of my code
[X] I have commented my code, particularly in hard-to-understand areas
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
Description
Created button that updates user location whenever position changes. When outside of a search zone, button is disabled and displays "Not in Search Zone". When within the search zone of the nearest POI, button activates and displays "Want distance to POI?". Clicking button shows the continuously-updating distance in meters.
Card Link
https://3.basecamp.com/5802516/buckets/37608217/card_tables/cards/7462902144
Type of change
How Has This Been Tested?
Coordinate-related math tests are in tests/utils folder (end-to-end testing tbd) Button function tested manually in developer tools. To test while not moving, go to developer tools > settings (3 dots) > more tools > sensors. Under location, sample cities or setting custom latitude/longitudes is possible.
Checklist before requesting a review