Please, forum I would like to know how to add an overview map control code in my qgis2web generated OpenLayers code.If am not clear enough the link below demonstrates what I mean https://openlayers.org/en/latest/examples/overviewmap.html


Find your exported OpenLayers map, and open resources/qgis2web.js in a text editor. Find the following line:

    controls: ol.control.defaults({attribution:false}).extend([

Insert this line immediately after it:

        new ol.control.OverviewMap(),

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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