Skip to content
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

feature request: improve logic behind map updates #512

Open
cl-tr opened this issue Dec 5, 2024 · 3 comments
Open

feature request: improve logic behind map updates #512

cl-tr opened this issue Dec 5, 2024 · 3 comments

Comments

@cl-tr
Copy link

cl-tr commented Dec 5, 2024

Dear CriticalMaps Developers,

here a feature request:

Is your feature request related to a problem? Please describe.
I have been using the CriticalMaps app (on iPhone 13 mini) now for some time and I have to say that it works very well to catch up with already on-going critical mass events.

One issue with the current implementation is that the current positions of the riders on the map are only loaded every 60 seconds (at second 10 of every minute if I am not mistaken). Since I don't mount my phone to the handle bar, this means that after stopping (and unlocking the phone), I have to wait for up to 60 seconds for the shared positions to load.

Describe the solution you'd like
It would be great if the shared positions could already be loaded once when the app is started, or when the phone (with the app already running) gets unlocked. Of course I do understand that the positions shared by the riders aren't constantly updated, but the possibility to immediately see their current positions would be great.

Moreover, would it be possible to indicate the user's current position in a different color (for instance red) than the other markers?

Describe alternatives you've considered
none

Additional context
n/a

Best regards from Hamburg
Christoph

@mltbnz
Copy link
Member

mltbnz commented Dec 6, 2024

Hi Christoph,

thanks for bringing it up.
The behavior you suggested is what's in place already if I'm not mistaken. I would need to debug to confirm but I'm pretty sure about it.

You can check the onAppear function. It gets called when the app appears so basically in its first launch or when the app comes to the foreground

@cl-tr
Copy link
Author

cl-tr commented Dec 6, 2024

Hello Malte,

thank you for your message.

I just did a quick test using a currently on-going CM in Norderstedt (two riders share their positions) and unfortunately it appears to me that it does not update when unlocking the phone.

This is what I did (I also simultaneously watch the positions of the riders in Norderstedt also on my PC, via https://www.criticalmaps.net/ ):

  • open the app on the iPhone
  • zoom into map, I do see several blocks on the screen, and the two riders
  • lock the iPhone
  • wait for a few minutes (on the PC I see that the riders moved quite a bit)
  • unlock the iPhone
  • indicated positions are still the old ones, they are refreshed only at second 10 of the minute

Hope this helps. I run version 4.5.0+241028 on iOS 18.1.1, hardware is iPhone 13 mini.

Best
Christoph

BTW: One very minor issue is that after updating the markers on the map, the number of riders indicated on the top left is only updated when one moves the map a tiny bit.

@mltbnz
Copy link
Member

mltbnz commented Dec 6, 2024

So your observation is correct and probably there is also the delay of when an updated position of a rider gets send to the backend. I do get why updating the map directly would be good but I don't think this will be added. We have added this time based updating behavior as a measure to keep the server costs low and I don't think we should add workarounds. While this could lead to an inaccurate position of the mass I think it's still good enough for someone who wants to join the mass or to keep up with it.

The different colored map overlay for yourself is something we can do and I think makes sense.

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

No branches or pull requests

2 participants