Frequently updated reference layer

Hi everyone,

For our use case we utilize a custom reference layer (.mbtiles file) as a backdrop for location widgets (geopoint, geotrace). This reference layer is updated almost daily.

We used to write a new .mbtiles file to the right ODK path using a third party tool. This way we could provide a daily update without user interaction.

In the latest versions of Android, file permissions have gotten a lot stricter. Third party apps are no longer allowed to write to directories other than their own. As a workaround we can write a new version of the .mbtiles file to a path that is not restricted, and ask the user to import this layer using the functionality that got added in ODK Collect 2024.2 (https://docs.getodk.org/collect-offline-maps/#adding-offline-layers-to-collect). However this adds some friction.

Has anyone come across a similar problem? Would there be any solutions to make life easier?

Thanks!

Hi @stokstaart

I don't think it's possible to make things easier in this case. Unfortunately, there is no way to automatically download offline layers. It seems that, in your situation, it would be helpful if offline layers functioned like media files attached to a form. You could then configure your devices to exactly match the forms on your server, update the file on your server once a day, and have those layers automatically downloaded. Does that sound right?

2 Likes

This is something I've requested in the past, (as well as being able to dynamically set the layer based on form inputs), which would make config much easier, not having to copy the tiles separately to syncing the form, especially allowing updates to them occasionally/ frequently.

2 Likes

That sounds great!

What would also work for us is being able to show geometries defined for a select one from map widget as a layer when filling out location questions. This information is already attached to the form, so that might be less profound of a change?

1 Like