Collect: Location marker disappears on map after sleep

1. What is the problem? Be very detailed.
When using the geopoint widget with appearance 'maps' the current GPS location is shown with a blue cross with a semi-transparent circle indicating the accuracy.

If I am using the map to navigate to a predefined point (on, for example my background layer .mbtiles file) this works fine until the screen goes to sleep. On reactivating the screen the location is not visible even though the map will centre to the current location by tapping the GPS location button (2nd down) on the screen.
This behaviour also occurs when using the map feature for 'fill empty form' - existing points are displayed on wake, but not the current location.

2. What app or server are you using and on what device and operating system? Include version numbers.
ODK Collect 1.27.3
3. What you have you tried to fix the problem?
Tried the app on different 3 devices - same problem.
Tapping back key and re-opening the map fixes the problem immediately, so it is perhaps just not rendering the GPS location on wake?
4. What steps can we take to reproduce the problem?
As above - open the location widget, get a GPS signal / location, allow the screen to turn off / sleep, reactivate / wake screen.
5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

Thanks!

Can you please share your basemap source and style? This is important even if you're layering an .mbtiles file on top because it determines the mapping engine used. I suspect you're using Mapbox and that you're experiencing https://github.com/getodk/collect/issues/3883.

How ever did you guess :slight_smile: must be all my suggestions on the forum about using offline maps!

Yes, I am using Mapbox and my layer is a .mbtiles raster, generated from QGIS, based on Ordnance Survey Zoomstack data plus my own data (combined vector layers converted to raster as I've described elsewhere on the forum - View GPS point on Map for Blank Forms - #7 by seewhy).

I have just done another test, and fortunately I'm 150km from the .mbtiles map extent... So that means my basemap is not 'in range' when I use the same form at home, but with the Mapbox background mapping visible I can reproduce the issue that you have referenced for point markers, but in my case the location circle / cross is still visible when I shut off the screen and wake it again, so not all overlays are destroyed if there is no offline map layer visible on the screen - I didn't notice whether the point marker was also destroyed while I was on site, and I'm not going back for about 2 weeks so can't check that easily!

When I created my offline layer, I set the zoom levels for my .mbtiles layer to the range from 10 - 18 and I recollect that when zoomed out so that my layer was not visible there was a location cross, which disappeared as soon as I zoomed back in - I thought it might have been rendered below the .mbtiles layer so was hidden, but as I was trying to do fieldwork, I didn't test every scenario...

In my usual tinkering style, I saw that there was a bit of a workaround for the 'destroyed' point marker... I noticed that the new marker button and delete buttons were inactive when waking the screen, but if I long-tap on the map to create a new marker location (my appearance setting for the form allows me to!), then a new marker appears, and I can then delete it and reset it to the GPS location (for example) without closing the widget and starting again. Not sure if this is relevant to solving the issue, but may be of interest.

Thanks for your prompt help, appreciated as always.

1 Like