[Lizmap] Atlas printing with images from media folder
Alain le gallou
alain.legallou at agglo-fecampcauxlittoral.fr
Mon Oct 30 04:46:46 PDT 2023
Hello,
I manage to print images in an atlas layout and to show them in the popup without problem.
In the popup, I use this code :
[% CASE
WHEN "photo1" IS NOT NULL OR trim("photo1") != ''
THEN concat(
'<p>', '<b>Photo N°1</b>', '<div class="field">',
concat( '<a href="', "photo1", '" target="_blank">',
' <img src="',"photo1", '" width="100%" title="Photo N°1">', ' </a>'),
'</div>', '</p>' )
ELSE ''
END %]
where photo1 is like : « ../media/upload/name_of_the_project/name_of_the_layer/name_of_the_field/name_of_the_picture.jpg »
In the atlas layout, i use an HTML frame with this code :
<table>
<tr>
<td>
[%if( attribute(@atlas_feature,'photo1') IS NOT NULL,
concat('<img src=',attribute( @atlas_feature , 'photo1' ),' width=100%>'),'')%]
</td>
</tr>
</table>
With this example, it’s OK under Lizmap Web Client. I haven’t tried under QGIS but I think it will be OK if I had the same tree structure.
I hope this feedback will help you.
Regards.
[cid:image001.png at 01DA0B29.7151EC90]<https://www.agglo-fecampcauxlittoral.fr/>
Alain LE GALLOU
Géomaticien / Chargé du Système d'Information Géographique (SIG)
Communauté d’Agglomération Fécamp Caux Littoral
825, route de Valmont - 76 403 Fécamp Cedex
Tél. : 02 35 10 48 48
Port. : 06 14 19 52 51
Fax : 02 35 10 31 66
Mail : alain.legallou at agglo-fecampcauxlittoral.fr<mailto:alain.legallou at agglo-fecampcauxlittoral.fr>
Site internet : www.agglo-fecampcauxlittoral.fr<http://www.agglo-fecampcauxlittoral.fr/>
[Eco-attitude]
Adoptez l'éco-attitude.
N'imprimez ce courriel que si c'est vraiment nécessaire
De : Lizmap <lizmap-bounces at lists.osgeo.org> De la part de Arnaud Vandecasteele via Lizmap
Envoyé : lundi 30 octobre 2023 11:26
À : Etienne Trimaille <etrimaille at 3liz.com>
Cc : lizmap at lists.osgeo.org
Objet : Re: [Lizmap] Atlas printing with images from media folder
Hi,
I remember encountering the same problem a few months ago.
I think we had a discussion about an improvement made by René-luc.
But I can't find our discussion in my emails...
Adding images in an atlas was not possible, it is like they were not fully loaded.
Regards,
Arnaud
On Mon, Oct 30, 2023 at 12:27 PM Etienne Trimaille via Lizmap <lizmap at lists.osgeo.org<mailto:lizmap at lists.osgeo.org>> wrote:
Hi,
Does a static logo/picture just stored in 'media/' works ?
It should be, anyway, without expressions.
But I sometimes use an expression with it doesn't work : https://docs.lizmap.com/current/en/publish/configuration/print.html#adding-your-own-images-in-a-layout
On 25/10/2023 20:48, G. Wagner, Wagner-IT via Lizmap wrote:
Hi,
I am photographing and saving images directly from the Lizmap client. The
images are saved autom. under ./media/......
And also displayed again in the popup window.
Now I want to use these images also in the atlas print.
If I copy the complete media directory locally, the atlas print incl. the
images in the local QGIS works fine.
But the images are not found in the atlas print in the WebClient. Is there
a trick?
Thanks and greetings
Günter
QGIS Server 3.22.16 (Ubuntu) with Lizmap 3.6.7
WAGNER-IT
Ingenieurbüro für Geoinformatik
Carl-Orff-Weg 7
79312 Emmendingen
Tel.: 07641/9621668
Fax: 07641/915599
www.wagner-it.de<http://www.wagner-it.de> <http://www.wagner-it.de/><http://www.wagner-it.de/>
_______________________________________________
Lizmap mailing list
Lizmap at lists.osgeo.org<mailto:Lizmap at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/lizmap
--
Etienne Trimaille
Géomaticien
www.3liz.com<http://www.3liz.com>
Tel. 06 12 93 11 39
Bureau
31, rue de l'Argenterie
34000 Montpellier
Siège social
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier
_______________________________________________
Lizmap mailing list
Lizmap at lists.osgeo.org<mailto:Lizmap at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/lizmap
--
--------------------------------------------------------------------
Arnaud Vandecasteele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/lizmap/attachments/20231030/df416a13/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 26278 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/lizmap/attachments/20231030/df416a13/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1222 bytes
Desc: image002.gif
URL: <http://lists.osgeo.org/pipermail/lizmap/attachments/20231030/df416a13/attachment-0001.gif>
More information about the Lizmap
mailing list