【解决办法】先获取当前坐标系对应的比例尺数组,可以根据分辨率和DPI进行计算,
一种方式是通过公式:
3857: Scale = 1:(Resolution* PPI/0.0254)
4326:Scale = 1: [Resolution* ( PPI / 0.0254 ) * 2 * PI * 6378137 / 360]
还有一种方式是通过iClient接口
const result = L.supermap.CommonUtil.getScaleFromResolution(res, 'degrees'); // 得到的是比例尺分母
const result1 = L.supermap.CommonUtil.getScaleFromResolutionDpi(res, 96, 'degrees'); // 得到的是比例尺