MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / scaleToResolution

Function scaleToResolution

src/common/util/MapCalculateUtil.js:276–281  ·  view source on GitHub ↗
(scale, dpi, mapUnit)

Source from the content-addressed store, hash-verified

274 * ```
275 */
276export function scaleToResolution(scale, dpi, mapUnit) {
277 const inchPerMeter = 1 / 0.0254;
278 const meterPerMapUnitValue = getMeterPerMapUnit(mapUnit);
279 const resolution = 1 / (scale * dpi * inchPerMeter * meterPerMapUnitValue);
280 return resolution;
281}
282
283export function getDpi(scale, resolution, mapUnit) {
284 const inchPerMeter = 1 / 0.0254;

Callers 3

getZoomFunction · 0.90
scalesToResolutionsFunction · 0.70

Calls 1

getMeterPerMapUnitFunction · 0.85

Tested by

no test coverage detected