[qgis-qwc2] Help with using coordinates in qwc2
Xavier Moch (AFPG)
xavier.moch at afpg.asso.fr
Tue Jan 18 09:21:45 PST 2022
Hi there !
I’ve used qwc2 for some months, but I still miss something in the configuration. It might be using mapClickAction. Actually :
* I’d like to open a URL in a new tab when clicking on a (home-made) button of the top bar.
* This URL requires x and y coordinates.
* I’ve set something that « works » in config.json :
{"key": "SIGES", "icon": "layers", "mapClickAction": "identify", "url": "https://sigescen.brgm.fr/?page=logRegionalLISA&SRS=EPSG:2154&X=$x$&Y=$y$"}
* But this refers to x and y as being the center of the current view.
1/ Does anyone know how to trigger the action when clicking on a point on the map (and not when clicking on the button), with $x$ and $y$ being the coordinates of the clicked point ?
2/ Moreover, is there a way to indicate something like SRS=$mapcrs$ ? Normally, the configuration makes $x$ and $y$ being computed with EPSG:2154, but there might be something cleaner to write.
3/ I did not get how the info-tooltip appears when the mouse is on the (homemade) button. I would like to specify something else than appmenu.items.SIGES. Does anyone know where it could be done ?
Thanks in advance,
Xavier
More information about the qgis-qwc2
mailing list