Newer
Older
smartwell_front_yizhuang / src / components / leaftletMap / base / crsUtils.js
dutingting on 23 Mar 2023 872 bytes 图层画完,等待接口
import L from 'leaflet'
/*eslint-disable*/
import proj4leaflet from 'proj4leaflet'
/*eslint -enable*/
// 定义2000坐标系CRS
const CRS_4490 = new L.Proj.CRS('EPSG:4490', '+proj=longlat +ellps=GRS80 +no_defs', {
  resolutions: [
    1.40625,
    0.703125,
    0.3515625,
    0.17578125,
    0.087890625,
    0.0439453125,
    0.02197265625,
    0.010986328125,
    0.0054931640625,
    0.00274658203125,
    0.001373291015625,
    6.866455078125E-4,
    3.4332275390625E-4,
    1.71661376953125E-4,
    8.58306884765625E-5,
    4.291534423828125E-5,
    2.1457672119140625E-5,
    1.0728836059570312E-5,
    5.364418029785156E-6,
    2.682209064925356E-6,
    1.3411045324626732E-6
  ],
  origin: [-180, 90]
})
export const crsDict = {
  '4326': L.CRS.EPSG4326, // WGS84坐标系
  '3857': L.CRS.EPSG3857, // web墨卡托投影
  '4490': CRS_4490 // CGCS2000坐标系
}