首页 / 浏览问题 / WebGIS / 问题详情
web端source.getState()报错
5EXP 2025年08月02日

openlayers包与supermap的iclient-ol包的版本匹配,来自TileLayer的source的state属性的值为true,但网页报错Uncaught (in promise) TypeError: source.getState is not a function
    at VectorTileLayer.handleSourcePropertyChange_ (chunk-CKUMQJDI.js?v=572dae80:466:18)
    at VectorTileLayer.dispatchEvent (chunk-ASKVX2KB.js?v=572dae80:364:22)
    at VectorTileLayer.notify (chunk-ASKVX2KB.js?v=572dae80:618:12)
    at VectorTileLayer.set (chunk-ASKVX2KB.js?v=572dae80:654:14)
    at VectorTileLayer.setSource (chunk-CKUMQJDI.js?v=572dae80:653:10)
    at new Layer (chunk-CKUMQJDI.js?v=572dae80:393:10)
    at new BaseVectorLayer (chunk-FQEAHC6T.js?v=572dae80:1883:5)
    at new VectorTileLayer (chunk-FQEAHC6T.js?v=572dae80:12805:5)
    at Network.vue:193:33

请问是否是因为 SuperMap 自定义的图层源可能未完全实现 OpenLayers 的 Source 标准接口?

若不是,可能是什么原因?

登录 或者 注册 后回答这个问题。

...