MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / getResFromScale

Method getResFromScale

src/openlayers/mapping/WebMap.js:506–509  ·  view source on GitHub ↗

* @private * @function WebMap.prototype.getResFromScale * @description 将比例尺转换为分辨率 * @param {number} scale - 比例尺 * @param {string} coordUnit - 比例尺单位 * @param {number} dpi

(scale, coordUnit = 'DEGREE', dpi = 96)

Source from the content-addressed store, hash-verified

504 * @param {number} dpi
505 */
506 getResFromScale(scale, coordUnit = 'DEGREE', dpi = 96) {
507 let mpu = metersPerUnit[coordUnit.toUpperCase()];
508 return (scale * 0.0254) / dpi / mpu;
509 }
510 /**
511 * @private
512 * @function WebMap.prototype.getScaleFromRes

Callers 1

getScalesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected