I am trying to get some of the control sets offered by OpenLayers into a project exported using QGIS2WEB. I am looking to use the export to Pdf function and have successfully created a test page using it. However I do not know how to integrate the function/script into the qgis2web project. Eventually I would also like to also add the draw feature control

1 Answer 1


I would recommend you place your extra code in the output file resources/qgis2web.js. That is the file where ol.Map is instantiated. You should therefore be able to match that up with the example page you cite.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.