Skip to content

Maps feature updated #1429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Apr 23, 2025
Merged

Maps feature updated #1429

merged 35 commits into from
Apr 23, 2025

Conversation

ranisa-gupta16
Copy link
Contributor

@ranisa-gupta16 ranisa-gupta16 commented Apr 9, 2025

JIRA Ticket

BSS-799

BSS-801

BSS-739 - will add a separate quick pr for this after discussion with steve.

ngrok local testing:
One of the way to test it locally that I tried is ngrok to forward ports for /app 3000 and api 8080
Worked but didn't quite smoohtly. :-(

npm install -g ngrok
My auth code - not adding here: ngrok config add-authtoken <your_token_here>

yaml for both: worked well in mobile phone individually
version: "2"
authtoken: <your_token_here>
handle redirect 3001
tunnels:
frontend:
addr: 3000
proto: http

backend:
addr: 8080
proto: http

~/.config/ngrok/ngrok.yml - rg prfix

update env files for /app, /api

Description

This PR enhances the Map component by:

Implemented a, real-time GPS location cursor:

A blue dot for user position

A rotating directional triangle for heading

A pulsing accuracy circle

Changes related to live gps cursor in real-time, there should be a map cursor pointing as per user's location

The ability to save and clear the selected point has been enhanced and more intuitive , pin location has been added replacing the green dot that was previously used to save point.

Note: Real GPS and fake GPS modes are mutually exclusive

Added support for browser-based testing via window.USE_FAKE_GPS = true: (Won't wokr if some silent issue in maps are there)
Simulates location updates using a circular path
Useful for desktop testing without mobile hardware

Commented the redundant marker like "Here" purple dot

Added a proper cleanup of previous layers/watchers on mount/unmount.

How to Test

Real GPS (Mobile or Secure Context):
Deploy or run the app in a mobile environment (or browser with HTTPS).
Open the map and grant location permissions.
Verify:
A blue dot with accuracy circle and directional triangle appears.
Cursor updates in real-time as you move.
You can select a pin and still see the live GPS cursor afterward.
You can clear the pin, and the live cursor remains.

Fake GPS Mode (Desktop browser testing):
Open DevTools console and run this before loading the map:
Copy -> window.USE_FAKE_GPS = true;
Reload the map page/component and test if it works in map
PLEASE NOTE FAKE GPS WON'T WORK IF THERE'S ANY ISSUE IN MAP OR ANY SILENT ISSUE. But added it for best case scenario.
To disable fake GPS, refresh the page and do not set the global flag.

Checklist

  • I have confirmed all commits have been signed.
  • I have added JSDoc style comments to any new functions or classes.
  • Relevant documentation such as READMEs, guides, and class comments are updated.

gup042 added 24 commits April 8, 2025 14:29
…st merged to test precision.

Signed-off-by: Ranisa Gupta <[email protected]>
Signed-off-by: Ranisa Gupta <[email protected]>
Signed-off-by: Ranisa Gupta <[email protected]>
Signed-off-by: Ranisa Gupta <[email protected]>
…location tracking. prep for mobile app testing via grok

Signed-off-by: Ranisa Gupta <[email protected]>
Signed-off-by: Ranisa Gupta <[email protected]>
Signed-off-by: Ranisa Gupta <[email protected]>
Copy link
Contributor

@stevecassidy stevecassidy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@ranisa-gupta16 ranisa-gupta16 merged commit 3dd3deb into main Apr 23, 2025
2 checks passed
@ranisa-gupta16 ranisa-gupta16 deleted the maps-feature-updated branch April 23, 2025 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants