-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Photos not showing in popup #661
Comments
Others have reported this (https://twitter.com/SylMaithya/status/1012380722148139009), but there doesn't seem to be an issue here, so thanks for opening this. My problem is that I can't investigate because I'm getting a QGIS crash when I set the widget type to Attachment. I've opened a QGIS issue: https://issues.qgis.org/issues/19118 Until the QGIS issue is fixed, I can't really make any progress. |
Same issue here - and no problems setting widget type to Attachment |
Please note: Same problem is when using QGIS version 2.18.23 and setting widget type to Photo (or Web, my photos are on another web server) |
Hallo, I had the same problem with my photos and i fixed it. Openlayers: Step 1: To view the photos in the browser you have to go into the created js-files after exporting from qgis. Step 2: Go to the folder layers and open the layers.js and change lyr_UmsetzungStecken2017_14.set('fieldImages', {'OBJECTID': 'Hidden', 'HR': 'TextEdit', 'ID': 'TextEdit', 'Shape_Leng': 'Hidden', 'Photo': 'ExternalResource', }); to lyr_UmsetzungStecken2017_14.set('fieldImages', {'OBJECTID': 'Hidden', 'HR': 'TextEdit', 'ID': 'TextEdit', 'Shape_Leng': 'Hidden', 'Photo': 'Attachment', }); Step 3: Go to the folder resources and open the qgis2web.js file search for the popup and change if (layer.get('fieldImages')[currentFeatureKeys[i]] != "Photo") { if (layer.get('fieldImages')[currentFeatureKeys[i]] != "Attachment") { after this this, you can view the photos in the browser Leaflet: with the Leaflet_framework, you only have to open the index-file and search for the popupContent and change \ Photo' + (feature.properties['Photo'] !== null ? Autolinker.link(String(feature.properties['Photo'])) : '') + '\ \ to \ \ \Ben |
@BenDienstl or any other user with this knowledge
to.....? |
Hello Tom, To set attachments with images/videos for qgis2web, I must use QGIS 2.18.....but I would like work with QGIS 3. Thank you for response. Jürgen Edit: |
@BenDienstl can you please explain the "to" part? It appears to be linking to an image of some sort. When I hover over the link it shows the same information as the "from" part. Thanks! |
Dear Ben, Worked perfectly. I would like to know the code to link the thumbnail images of the popup with the image display at its original size and resolution in another tab in the browser. Is it possible? I only tested on openlayers. Amadeu |
Hello,
@tomchadwin Greetings, Jürgen |
@jukos You can install the nightly, and test with that - that should have the upstream QGIS fix in it. |
Could you give me the link to "nightly"? |
You can install the nightly via the OSGeo installer: https://qgis.org/en/site/forusers/alldownloads.html#windows CAVEAT: I can take no responsibility for the installation of QGIS versions on your machine - please ensure you read up and understand how to do what you need. |
Hmm. I have tried the weekly version
without success (button is there, no crash.....but no image within qgis2web - same as before...). Only this version I could test. Problems with the other one. Maybe another one can do any test. I think I must waiting to the regular qgis version. Edit:
answer from m-kuhn:
I try it again......... |
Tom Chadwin:
(only) my test on the actual weekly 3.9 version: no button crash, but not yet images for qgis2web Greetings |
@ Tom Chadwin
What do you think? Thank you for answer and greetings |
Qgis2Web Version: 3.1.1
QGIS Version: 3.0.2-Girona
Platform: Windows 10
I apologise in advance if this is a user error, if so disregard.
In my case I have a field with a list of URLS and I want the URLS to show up as a photo in the popup instead of an HTML Link.
Here is the layer:
test.zip
QGIS 3 is a bit different and has an attachment widget with options to specify an
image
orweb view
whereas qgis2.X just has aphoto
andweb view
widget on their ownIf I set it to web view:
![image](https://user-images.githubusercontent.com/10035308/42922670-e34c14d6-8ade-11e8-894b-78b90ebd7bab.png)
Using Identify in QGIS yields the following which is ideally how it will look in the web map:
If I export the layer in leaflet or openlayers I just get a clickable link:
If I set it to image:
basically the same, just a clickable link:
I'm not sure if this is due to the changes in QGIS3, or if I am misunderstanding how it is supposed to work (maybe I'm missing a setting?). I can manually generate HTML tables if I need to but I presume that automation is the main intent for the plugin.
Let me know if you need anything else, I'm happy to provide any logs or additional testing as needed.
The text was updated successfully, but these errors were encountered: