mirror of https://gitee.com/antv-l7/antv-l7
fix(source): cluster layer
This commit is contained in:
parent
efbed8a820
commit
ba1578efff
|
@ -130,7 +130,8 @@ export default class Source extends Base {
|
||||||
const data = this.get('data');
|
const data = this.get('data');
|
||||||
// 如果是GeoJSON 数据返回原数
|
// 如果是GeoJSON 数据返回原数
|
||||||
// 颜色编码从1开始,要素索引从0开始,所以颜色转变要素需要减1
|
// 颜色编码从1开始,要素索引从0开始,所以颜色转变要素需要减1
|
||||||
return data.features
|
const isCluster = this.get('isCluster') || false;
|
||||||
|
return (data.features && !isCluster)
|
||||||
? data.features[featureId - 1]
|
? data.features[featureId - 1]
|
||||||
: this.data.dataArray[featureId - 1];
|
: this.data.dataArray[featureId - 1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue