使用产品:SuperMap iClient for OpenLayers,openlayers6.5.0
问题描述:之前正常加载没有问题,后来卸载了openlayers6.5.0又重新装的openlayers6.5.0,出现报错
TileLayer.js:260 Uncaught
TypeError: tileSource.getContextOptions is not a function at CanvasTileLayerRenderer.renderFrame (TileLayer.js:260:42) at Layer.render (Layer.js:232:28) at CompositeMapRenderer.renderFrame (Composite.js:133:27) at PluggableMap.renderFrame_ (PluggableMap.js:1137:20) at Map.eval (PluggableMap.js:194:12)
代码为
var roadLineLayer = new TileLayer({
source: new TileSuperMapRest({
url: bianjieUrl,
wrapX: true
}),
});
_this.map.addLayer(roadLineLayer);