维护公司的项目 使用的leaflet地图项目
由于版本号不对导致的问题
map.value = L.map("map", {
center: center,
zoom: zoom,
zoomAnimation: false, //禁用缩放动画
// minZoom: 3,
maxZoom: 9,
zoomControl: false, // 是否显示缩放控件
attributionControl: false, // 是否显示版权控件
crs: new L.supermap.Proj.CRS("EPSG:4490", {
def: "+proj=longlat +ellps=GRS80 +no_defs",
origin: [112.71, 34.98],
bounds: L.bounds([112.71, 34.26], [114.21, 34.98]),
}),
});
L.supermap.Proj.CRS在@supermap/iclient-leaflet 版本为9或者版本为10的依赖中没有这个方法 在最新的版本中更新了这个方法
在package.json中的配置 11i版本更新了这个方法
"@supermap/iclient-leaflet": "^11.0.1",
"leaflet": "^1.7.1",
"leaflet-draw": "^1.0.4",
"leaflet.markercluster": "^1.5.3",
在10.版本中方法为
L.CRS