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

If MBTile does not include a name, the name in the list of layers is blank #4494

Open
yanokwa opened this issue Mar 29, 2021 · 0 comments
Open

Comments

@yanokwa
Copy link
Member

yanokwa commented Mar 29, 2021

Software and hardware versions

Collect v1.30.1

Problem description

If an MBTile does not include a name in the metadata, the name field show in the list of layers is blank. This issue particularly annoying in the Maps preference pane because the sub-header under "Layer data file" is empty.

Screen Shot 2021-03-28 at 21 30 45

Steps to reproduce the problem

In any MBTile, make sure the metadata name is empty.
sqlite3 test.mbtiles "UPDATE "metadata" SET "value" = '' WHERE "name" = 'name'";

Then add it to the layers directory.
adb push test.mbtiles /sdcard/Android/data/org.odk.collect.android/files/layers/

Now in the Maps preferences view and the other mapping views, you will only see nothing in the primary label and the file path in the secondary label.

Expected behavior

If an MBTile does not include a name, maybe we should put "Name missing/unknown". I think there is similar language when we can't find media embedded in the form.

One alternative is to use the filename with the extension removed. If there are multiple files with the same name, the path in the secondary label should help users figure out which is why.

Other information

I looked at some popular sources of MBTiles and all of them had names in their files, so I doubt this is a wide-spread problem, but I figured I'd file it just in case.

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

1 participant