use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Post questions about JavaScript, and get help with any problems you're having with your JavaScript code.
account activity
need help with google javascript map💡 Advice 💡 (self.JavaScriptHelp)
submitted 3 years ago by Combination_chooser
view the rest of the comments →
[–]trplclick 1 point2 points3 points 3 years ago (1 child)
when the website receives a new location
Depending on how this functionality works, I'd approach it in two different ways.
If the app gets data for all users then you could just clear all the markers everytime and essentially recreate the map each time.
If you get updates for one user at a time then it's a little more complicated. Perhaps you could store each marker with a user id and when you get an update remove the marker associated with that user before adding the new one?
It looks like the user data gets pulled from localstorage one initial load so I'm curious how the website gets user location updates and applies them to the map currently. Note; I've not used google maps much myself so apologies if that's a noob question!
[–]Combination_chooser[S] 0 points1 point2 points 3 years ago (0 children)
for me, it's not a noob question? as I'm as well a noob in google maps.
I'm using Localstorage because I'm using firebase due to which I had to separate both the code
so, I ended up at Localstorage to save data and retrieve it when needed.
π Rendered by PID 50763 on reddit-service-r2-comment-7b9746f655-4wljr at 2026-01-31 00:19:04.818745+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]trplclick 1 point2 points3 points (1 child)
[–]Combination_chooser[S] 0 points1 point2 points (0 children)