Class: CRS

CRS

Proj坐标系统定义类

L.Proj.CRS(srsCode, options)

leaflet/core/Proj4Leaflet.js, line 82
Name Type Description
srsCode string

proj srsCode。

options Object

options。可选参数:
def -{string} 投影的proj4定义。
origin -{Array|L.Point} 原点。必填
scales -{Array} 比例尺数组
scaleDenominators -{Array} 比例尺分母数组
resolutions -{Array} 分辨率数组
bounds -{Array|L.Bounds} 范围

Example
用法:
   var crs =L.Proj.CRS("EPSG:4326",{
         origin: [-180,90],
         scaleDenominators: [2000,1000,500,200,100,50,20,10],
   });
   var map=L.map('map', {
      crs: crs
     ...
   })
https://leafletjs.com

Extends

Methods

scale(zoom)

leaflet/core/Proj4Leaflet.js, line 170

通过缩放级别获取比例尺值

Name Type Description
zoom number

缩放级别

Returns:
比例尺值

zoom(scale){number}

leaflet/core/Proj4Leaflet.js, line 194

根据比例尺返回缩放级别

Name Type Description
scale number

比例尺

Returns:
Type Description
number 缩放级别