Use attachment¶
In QField, a field with Attachment widget can be used to:
- mostrare e scattare foto
- show and record videos
- listen and record sound clips
- show links to external files like PDFs or documents
To configure the Widget, please refer to the Attributes Form Documentation
Aggiungi una serie di immagini a un elemento¶
Desktop preparation
One or more pictures can be added to the feature. Here is an example of how to proceed.
Tabelle¶
It is necessary to set up two tables. One table where the features are stored and one with a list of pictures.
Apiary¶
Campo | Tipo |
---|---|
id |
Text (UUID) |
geometry |
Geometria |
... |
Apiary_pictures¶
Campo | Tipo |
---|---|
id |
Text (UUID) |
apiary_id |
Text (UUID) |
path |
Text |
... |
Relazioni¶
Crea una relazione con:
apiary
Layer di riferimentoid
Campo di riferimentoapiary_picture
Layer che fa riferimentoapiary_id
Campo che fa riferimentostrength
Composizione
Widget¶
Apiary¶
Imposta il valore predefinito dell'id del campo a uuid()
o utilizza il widget UUID Generator. Non è necessario mostrarlo nel modulo.
Imposta il widget della relazione su relazione uno a molti e aggiungi la relazione al modulo
Immagine dell'apiario¶
Imposta il tipo di widget del percorso del campo a Attachment e aggiungilo al modulo
Geotagging¶
Lavoro sul campo
Some mobile devices will require for native camera mode to be turned off to enable geotagging.
To enable geotagging in case your native OS camera does not support this functionality, follow these steps:
- In QField, vai alle impostazioni e assicurati che Usa la fotocamera nativa sia deactivated sul tuo dispositivo mobile
- Completed! QField's own QML-based camera will now be utilized while taking pictures
Dimensione massima dell'immagine¶
Desktop preparation
The advanced settings allow rescaling the photos to a maximum width/height in QFieldSync plugin > Project configuration
Configurable attachment path¶
Desktop preparation
QFieldSync provides the possibility to configure the path of picture attachments.
- Go to QFieldSync plugin > Layers Properties
- Scegli il layer, il campo e configura l'espressione
Use expressions to specify the path of the attachments. By default, pictures are saved into the "DCIM" folder, audio are saved into the "audio" folder and videos are saved into "video" with a timestamp as name.
Additional directories can be synchronized with pictures or other attachments. Extra paths can be configured in Attachment directories. All paths are relative to the project directory.
Note
Per questa funzionalità è necessario QGIS 3.14 o versioni successive