有没有人在最新的mapbox gl中遇到以下错误?这在地图的setFilter时发生。
VM5448:227 Uncaught TypeError: Cannot read property 'id' of undefined(…)
t.setFilter @ mapbox-gl.js?6b34:formatted:6061
e.setFilter @ mapbox-gl.js?6b34:formatted:10080
(anonymous function) @ map.service.ts?33cd:135SafeSubscriber.__tryOrUnsub @ VM5448:223
SafeSubscriber.next @ VM5448:172
Subscriber._next @ VM5448:125
Subscriber.next @ VM5448:89
handler @ VM5521:126
Evented.fire @ mapbox-gl.js?6b34:formatted:11031
h @ mapbox-gl.js?6b34:formatted:8249
u @ mapbox-gl.js?6b34:formatted:8213
ZoneDelegate.invokeTask @ zone.js?fad3:265
onInvokeTask @ core.umd.js?e2a5:6197ZoneDelegate.invokeTask @ zone.js?fad3:264
Zone.runTask @ zone.js?fad3:154ZoneTask.invoke @ zone.js?fad3:335
t.setFilter @ mapbox-gl.js?6b34:格式化:6061
t.prototype.setFilter = function(e, t) {
this._checkLoaded();
var r = this.getLayer(e);
return null !== t && this._validate(validateStyle.filter, "layers." + r.id + ".filter", t) ? this : util.deepEqual(r.filter, t) ? this : (r.filter = util.clone(t),
this._updateLayer(r))
}
答案 0 :(得分:0)
这是关闭的。升级到0.28.0