Skip to content

Commit ce528ba

Browse files
committed
【bug】1) webmap用的wmts dpi没有用对,造成出图有部分出不来
1 parent 2890dbe commit ce528ba

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ export class WebMap extends Observable {
409409
}).then(function(capabilitiesText) {
410410
baseLayerInfo.extent = [mapInfo.extent.leftBottom.x, mapInfo.extent.leftBottom.y, mapInfo.extent.rightTop.x, mapInfo.extent.rightTop.y];
411411
baseLayerInfo.scales = me.getWMTSScales(baseLayerInfo.tileMatrixSet, capabilitiesText);
412-
baseLayerInfo.dpi = 90.6;
412+
baseLayerInfo.dpi = dpiConfig.iServerWMTS;
413413
source = me.createWMTSSource(baseLayerInfo);
414414
me.addSpecToMap(source);
415415
}).catch(function(error) {
@@ -1177,7 +1177,6 @@ export class WebMap extends Observable {
11771177
const isKvp = !layerInfo.requestEncoding || layerInfo.requestEncoding === 'KVP';
11781178
layerInfo.tileUrl = that.getTileUrl(capabilities.OperationsMetadata.GetTile.DCP.HTTP.Get, isKvp, layerInfo.layer, layerInfo.tileMatrixSet);
11791179
//将需要的参数补上
1180-
layerInfo.dpi = 90.7;
11811180
layerInfo.extent = extent;
11821181
layerInfo.matrixSet = matrixSet;
11831182
layerInfo.name = name;
@@ -1262,7 +1261,7 @@ export class WebMap extends Observable {
12621261
* @returns {ol/tilegrid/WMTS} wmts的瓦片
12631262
*/
12641263
getWMTSTileGrid(extent, scales, unit, dpi, origin, matrixIds) {
1265-
let resolutionsInfo = this.getReslutionsFromScales(scales, dpi || 96, unit);
1264+
let resolutionsInfo = this.getReslutionsFromScales(scales, dpi || dpiConfig.iServerWMTS, unit);
12661265
return new WMTSTileGrid({
12671266
origin,
12681267
extent: extent,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy