HTML widget can't display more than 1 image?
I was trying to workaround partially https://github.com/MerginMaps/mobile/issues/3722 by using the HTML widget to show photos as documented here
https://merginmaps.com/docs/layer/form-layout/#using-html-widget-to-display-online-images-and-other-online-resources
Anyway I'm not able to show more than one photo in the same HTML widget, when I try this is the result, where the bottom picture is not shown and it appear just ";)". In the widget I'm just repeating twice the documented code snippet
<script>document.write(expression.evaluate("'<a href=\"'||attribute( @feature, 'link' )||'\"><img src=\"'||attribute( @feature, 'link' )||'\" width=300></a>'"));</script>
<script>document.write(expression.evaluate("'<a href=\"'||attribute( @feature, 'link' )||'\"><img src=\"'||attribute( @feature, 'link' )||'\" width=300></a>'"));</script>
I'm also not sure if this is rather a QGIS problem, because the preview in QGIS 3.40 is not working, as you noted in your docs
Hi @gioman, I have not played around with this yet, but I'd expect you need to use one script tag and not duplicate it twice. Have you tried adding two img tags next to each other and break them with br?
I'll forward this to our support as well to see if there is a way to do it :)
I have not played around with this yet, but I'd expect you need to use one
scripttag and not duplicate it twice. Have you tried adding twoimgtags next to each other and break them withbr?
@tomasMizera tried that, won't work either.
Wouldn't the gallery widget (relation) be a better choice in this case @gioman?
Wouldn't the gallery widget (relation) be a better choice in this case @gioman?
@tomasMizera do you mean this https://merginmaps.com/docs/layer/attach-multiple-photos-to-features/#how-to-attach-multiple-photos-to-features ?
If yes then in theory yes you want to use the approach you documented. In practice is sometimes not the best path because maybe the number of photos to take is a fixed and small one (1/2) but also because there are cases (quite frequent) where you want to avoid use a 1:n when who needs to look at the data does not have the "tools" to handle that.
Yes yes @gioman, I meant this. Can you elaborate a bit more please on the issue about missing "tools to handle that"?
Can you elaborate a bit more please on the issue about missing "tools to handle that"?
@tomasMizera believe it or not, there is a lot of non technical people that does not know what is a Join and how to handle that in their daily jobs. In this cases is preferable avoid a 1:n data model unless strictly necessary.