Skip to content

Commit

Permalink
fix(source): cluster layer
Browse files Browse the repository at this point in the history
  • Loading branch information
lzxue committed Apr 10, 2019
1 parent 66f0e94 commit 642a841
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/source.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ export default class Source extends Base {
const data = this.get('data');
// 如果是GeoJSON 数据返回原数
// 颜色编码从1开始,要素索引从0开始,所以颜色转变要素需要减1
return data.features
const isCluster = this.get('isCluster') || false;
return (data.features && !isCluster)
? data.features[featureId - 1]
: this.data.dataArray[featureId - 1];
}
Expand Down

0 comments on commit 642a841

Please sign in to comment.