HTML code in Maptips for display of photos in a one-to-many relation #2951
Unanswered
BoswachterMarc
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am struggling with a html notation to display photos with Maptips in QGIS due to the configuration for QField (2.1.4 Bumblebee) that syncs on QfieldCloud.
The situation is the following with QGis 3.24.3 Tisler on Ubuntu:
In the (mobile) project it must be possible to add different photos to one feature.
Because of that, there are two tables: 1/ geometry layer with the features (todo) and 2/ another layer without geometry but with a list of pictures (tbl_foto).
For details, see the manual for QField: https://docs.qfield.org/how-to/pictures/
The one to many relation (rel_foto) was set and is functioning.
In the mobile QField application the pictures are saved and visible. The photos are also visible in the QGis desktop project when opening the attribute widget form (drag and drop).
When I try to use a html code to show those photos with maptips, I don't get it to work...
1/ I assume - because of the two tables, one with geometry and the other without - I need to write the html code in the layer with the geometry (todo)
2/ Because the project doesn't have a project_home set (it is not compatible with syncing over QField Cloud), I created a virtual field "project_home" in the geometry table (todo)
3/ When a photo is taken, the name and path of the photo is stored in the no geometry layer (tbl_foto) and the field "path".
As far as I understand, the html code in Maptips should point to the project_home and the field "path" where the photos are stored.
But since I don't have the project_home set in the project the alternative is pointing out to a virtual field where the @project_home variable is stored, in my case the field "project_home" (see purple printscreen above). So I tried the following
and a series of others...
But none of them work. What is the solution? Is it possible? What am I overlooking, which html code would be suitable?
Beta Was this translation helpful? Give feedback.
All reactions