In my desktop QGIS I have a short Python script that opens an HTML page including arguments (attributes of the selected feature).  When I use QGIS2web to put the  project on the web, I would like the user to trigger that action when he/she clicks on a feature.  I would be grateful for advice on how to do that.
=========================
#This is the script for Action "showPhoto"
import webbrowser
host = "promPics.rf.gd"
cName = "[%"common name"%]"
lName = "[%"latin name"%]"
picture = "[%"picture"%]"
theURL = "http://"; + host + "/?"
theURL = theURL + "cName=" + cName + "&"
theURL = theURL + "lName=" + lName + "&"
theURL = theURL + "photo=" + picture
webbrowser.open(theURL)
=====================
If you're interested, you can see an older, two-click, approach at
           BrooklynProm.epizy.com
    [Garden B only]


_______________________________________________
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to