lizmap-web-client
lizmap-web-client copied to clipboard
Requested print scale changes when zooming the map
What is the bug?
Requested print scale changes when zooming the map
Steps to reproduce the issue
- Choose Print
- Choose a print scale - the red print extent rectangle draws
- zoom the map
- the print scale changes instead of staying at the set value.
Expected behavior
It needs a lock, so that once you choose your scale, it sticks there but you can still zoom and check your overlay is perfectly positioned . (this is helpful when you have a smaller screen)
hi @gubuntu is it the same as here? https://github.com/3liz/lizmap-web-client/issues/1514
no I don't think so - in my case I don't care what the map scale is, I just want the print scale to stay the same as I set it while I zoom in and out.
to achieve the expected behaviour, simply remove the annoying "zoomend" event listener in \lizmap\www\assets\js\map.js 😉
//map.events.on({
// "zoomend": function() {
// if ( dragCtrl.active && layer.getVisibility() ) {
// // get scale
// var scale = getPrintScale( printCapabilities.scales );
// // update the select
// $('#print-scale').val(scale);
// // draw print box
// drawPrintBox( dragCtrl.layout, layer, scale );
// }
// }
//});