-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathgeoFilter.ts
More file actions
40 lines (31 loc) · 1.02 KB
/
geoFilter.ts
File metadata and controls
40 lines (31 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { GeoFilterItem } from "./geoFilterItem";
export abstract class GeoFilter {
public initialized: boolean;
public filterItems: GeoFilterItem[];
public replacedValueToIndex: boolean;
public key: any;
public keyIndex: number;
constructor(filterItems: GeoFilterItem[]) {
this.filterItems = filterItems || [];
this.replacedValueToIndex = false;
}
addFilterItem(filterItem: GeoFilterItem) {
this.filterItems.push(filterItem);
}
initialize() {
this.initializeCore();
this.initialized = true;
}
initializeCore() { }
matchOLFeature(feature: ol.Feature, zoom: number): boolean {
if (!this.initialized) {
this.initialize();
}
return this.matchFeatureCore(feature, zoom);
}
replaceVaulesToPbfIndex(pbfLayer: any) {
this.replaceVaulesToPbfIndexCore(pbfLayer);
}
abstract matchFeatureCore(feature: ol.Feature, zoom: number): boolean;
abstract replaceVaulesToPbfIndexCore(pbfLayer: any);
}