fix: source 聚合方法接口定义问题

This commit is contained in:
thinkinggis 2019-12-17 14:08:02 +08:00
parent 388ca023e7
commit 2a97e91d25
3 changed files with 5 additions and 5 deletions

View File

@ -63,8 +63,8 @@ export interface ISource {
clusterOptions: Partial<IClusterOptions>;
updateClusterData(zoom: number): void;
getFeatureById(id: number): unknown;
getClusters(zoom: number): unknown;
getClustersLeaves(id: string): unknown;
getClusters(zoom: number): any;
getClustersLeaves(id: number): any;
}
export interface IRasterCfg {
extent: [number, number, number, number];

View File

@ -84,10 +84,10 @@ export default class Source extends EventEmitter {
});
this.init();
}
public getClusters(zoom: number) {
public getClusters(zoom: number): any {
return this.clusterIndex.getClusters(this.extent, zoom);
}
public getClustersLeaves(id: number) {
public getClustersLeaves(id: number): any {
return this.clusterIndex.getLeaves(id, Infinity);
}
public updateClusterData(zoom: number): void {

View File

@ -36,7 +36,7 @@ export default class Point3D extends React.Component {
type: 'quantile',
})
.size('point_count', [5, 10, 15, 20, 25])
// .size(10)
.active(true)
.color('red')
.style({
opacity: 0.3,