lizmap-web-client icon indicating copy to clipboard operation
lizmap-web-client copied to clipboard

Requested print scale changes when zooming the map

Open gubuntu opened this issue 5 years ago • 3 comments

What is the bug?

Requested print scale changes when zooming the map

Steps to reproduce the issue

  1. Choose Print
  2. Choose a print scale - the red print extent rectangle draws
  3. zoom the map
  4. 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)

gubuntu avatar May 03 '20 19:05 gubuntu

hi @gubuntu is it the same as here? https://github.com/3liz/lizmap-web-client/issues/1514

josemvm avatar May 04 '20 08:05 josemvm

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.

gubuntu avatar May 04 '20 08:05 gubuntu

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 );
//    }
//  }
//});

cxcandid avatar Mar 29 '22 11:03 cxcandid