0%

openlayer export big image

var view = map.getView();
var vs = layer_tile.getSource();

console.log(map.getSize());
console.log(vs.getExtent());
console.log(view.getResolution());

  • extent view 18

分辨率: 2.388657133911758 zoom 是: 16

分辨率: 0.5971642834779395 zoom 是: 18

var mm = map.getView().getResolution()/0.5971642834779395;
var sizearr = map.getSize();
var rs = [sizearr[0]*mm,sizearr[1]*mm];