MerginMaps / MerginMaps/mobile

HTML widget can't display more than 1 image?

Open
#3,723 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

forms question support question
Dominant language
C++
Stars
388
Forks
87
Avg merge
2d 7h
Merged PRs (30d)
20

Description

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>

Image

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

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the HTML widget using the two repeated scripts from the report, and compare the result in Mergin Maps with the QGIS 3.40 preview. Trace whether the failure belongs to the mobile app or QGIS rendering, then verify that two images render when the relevant issue is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.