首页 / 浏览问题 / WebGIS / 问题详情
undefined (reading 'tiledMapLayer')
1EXP 2022年06月13日

使用产品:iclient 10i

问题详细描述:

在项目里开发地图功能时出现地图无法正常显示的问题,报错TypeError: Cannot read properties of undefined (reading 'tiledMapLayer')

用同样的代码和运行环境新建了一个测试用项目,重新安装了依赖,可以正常显示地图,但是放到之前的项目中还是无法显示。

        map = L.map(supermap_box, {
          center: [22.831134, 108.324011],
          zoom: 12,
          zoomControl: false,
          maxZoom: 18,
          minZoom: 1,
          scaleDenominators: [100000, 50000, 25000, 20000, 10000, 5000, 2000, 1000]
        })
        // 叠加矢量地图

        probasemap = L.supermap.tiledMapLayer(config.url, {
          noWrap: true
        }).addTo(map)

1个回答

您好,根据您的描述,建议您卸载对应依赖再根据新项目重新安装依赖
3,350EXP 2022年06月13日
...