mirror of https://gitee.com/antv-l7/antv-l7
commit
7df9a645c9
|
@ -2,7 +2,7 @@ import rbush from 'rbush';
|
||||||
import turfBox from '@turf/bbox';
|
import turfBox from '@turf/bbox';
|
||||||
export default class FeatureIndex {
|
export default class FeatureIndex {
|
||||||
constructor(data) {
|
constructor(data) {
|
||||||
this.tree = rbush();
|
this.tree = new rbush();
|
||||||
this.rawData = data;
|
this.rawData = data;
|
||||||
data.features.forEach(feature => {
|
data.features.forEach(feature => {
|
||||||
this.insert(feature);
|
this.insert(feature);
|
||||||
|
|
Loading…
Reference in New Issue