使用sql查询满足条件的对象,成功返回结果,从结果集中获取一个个的feature,然后将其添加到新建的数据源,程序运行报错:
var querySource = new ol.source.Vector({
wrapX: false
});
var length = features.length;
for(var i = 0;i < length;i++){
var feature = features[i];
querySource.addFeature(feature);
}
错误类型是:Uncaught (in promise) TypeError: a.addEventListener is not a function
应该怎么做?