criticalmaps / criticalmaps-ios

Critical Maps iOS App 🚲✊
http://www.criticalmaps.net
MIT License
289 stars 42 forks source link

Observation Mode cannot be switched off #486

Closed dontyetknowmyusername closed 11 months ago

dontyetknowmyusername commented 1 year ago

I've got 3 Apple devices:

I downloaded the latest Critical-Maps-App (V. 4.2.1, Build 230607) from the Apple App Store onto all 3 devices and started the app.

On a Windows-PC I opened Firefox and went to https://www.criticalmaps.net/map and zoomed in to my location. I saw 3 markers, one for each of my Apple devices.

On each device I then went into settings and switched on the Observation Mode.

On the PC I refreshed the page (Shift + Refresh) and also waited several minutes, but the markers were still visible.

I then switched Observation Mode off and on several times and refreshed the map in Firefox and also waited several minutes, but the markers were still visible.

Only when I closed the apps on the Apple devices, the markers would stop showing on the map.

mltbnz commented 1 year ago

Hi. Thanks for bringing this up.

When the observation mode is switched on the app should not send any new locations to the server.

If a location was sent to the server it will be cached for some time and I would think that is why you see them after enabling observation mode.

It takes around 5 minutes

dontyetknowmyusername commented 1 year ago

Hi, thanks for replying :-)

Unfortunately, the location sharing seems to stop altogether after around 5 minutes, no matter, wether Observation Mode is turned on or off. I discovered this while playing with the settings for the Observation Mode. The only way to turn location sharing back on seems to be closing and re-opening the app -- and then again, after ca. 5 minutes, the markers disappear from the map (the map is also shown in a browser - firefox - on a different machine, not only in the apps on my 3 devices).

BTW, which part caches the location? The server or the app? Because closing the app results in nearly immediately vanishing markers from the map.

mltbnz commented 1 year ago

The server caches a sent location if no new location with the same id is sent.

It's correct that the location will disappear after around 5 minutes anyways since the app only will send a new location to the backend if the app generates a new one and that only happens if the user moves for roughly 200 meters.

Maybe it would be better to base sending a new location on a timer to like fetching other locations though since people sometimes need to wait.

I think I'll prototype that behavior and see if that doesn't increase the traffic too much

mltbnz commented 11 months ago

Please check the latest build from yesterday. Should resolve the issue

dontyetknowmyusername commented 11 months ago

I just downloaded the app on all 3 of my devices (2 iPads, 1 iPhone), tried it and it seems to work. Thank you so much! Now I can express my solidarity even if I can't participate myself.