处理之前的效果
处理之后的效果
处理之后的代码
this.map = new Map({
target: options.target,
view: new View({
center: options.center,
zoom: 16,
projection: this.pro_4326,
maxZoom: 18,
minZoom: 1,
constrainResolution: true,//设置缩放级别为整数
smoothResolutionConstraint: false,//关闭无极缩放,解决底图模糊
}),
controls: Control.defaults({
attributionOptions: {
collapsible: false,
collapsed: false,
},
zoom: false,
}),
})