-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Description
Request a feature or report a bug? [这是一个需求还是一个缺陷]
缺陷
One-line summary [问题简述]
加载矢量瓦片报错
Version [产品及版本]
- iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]: iclient-openlayers
- iClient version [iClient 版本]:v10.0.0
- Browser version [浏览器类型和版本]:谷歌78
- OS Version [操作系统类型和版本]:win10
Actual Behavior [当前现象]
iclient-openlayers-es6.js:89071 Uncaught TypeError: Cannot read property 'applyBackground' of undefined
at MapboxStyles_MapboxStyles._createStyleFunction (iclient-openlayers-es6.js:89071)
at MapboxStyles_MapboxStyles._initStyleFunction (iclient-openlayers-es6.js:89062)
at Image.img.onload (iclient-openlayers-es6.js:89044)
Expected Behavior [期望现象]
矢量瓦片可以加载
Example of reproducing the issue [重现现象的例子]
在本地
var style_url = "http://47.104.186.12:8090/iserver/services/map-mvt-ZiShuiTu/restjsr/v1/vectortile/maps/渍水图/style.json"
var format = new ol.format.MVT({
featureClass: ol.Feature
});
var style = new ol.supermap.MapboxStyles({
style: style_url,
map: map
})
style.on('styleloaded', function () {
console.log(style)
var layer_risk = new ol.layer.VectorTile({
declutter: true,
source: new ol.source.VectorTileSuperMapRest({
// url,
style: style_url,
projection: 'EPSG:3857',
format: format
}),
style: style.getStyleFunction()
});
console.log(layer_risk)
map.addLayer(layer_risk);
layer_risk.setVisible(false);
})
What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]
Metadata
Metadata
Assignees
Labels
No labels