qgis2web
qgis2web copied to clipboard
Use of static info box to show popup field info
Hi Tom,
Leaflet has different ways of showing info from the attribute table. The popup functionality is one of them, but is also possible to use an info-box, which is fixed in place, see the Custom Info Control example on the Leaflet website: https://leafletjs.com/examples/choropleth/
I think this to be a much used option in stead of the standard popup which is bound to the polygon.
I have no luck so far in adding this to the index.html, my knowledge of coding is too little. For instance, how do I get it to update when clicking on a polygon. And how does it know from which layer to get its information?
Any ideas on what code is needed and exactly where to put it?
And could this be a new feature in qgis2web? Having a choice between a standard popup or a static infobox (topleft, bottomleft, etc), filled the same way, with the same information?