【问题原因】遇到报错:TypeError: Cannot read properties of undefined (reading ‘tiledMapLayer’),这通常是由于按需引入时的 .babelrc 配置影响了全模块引入的使用。
【解决办法】若出现此情况,请移除 .babelrc 中的以下配置,以恢复全模块引入的正常使用。
{
"plugins": [
[
"@supermapgis/babel-plugin-import",
{
"libraryName": "@supermapgis/iclient-leaflet"
}
]
]
}