UNPKG

@igo2/geo

Version:
56 lines (55 loc) 1.7 kB
import { EntityStoreStrategy } from '@igo2/common/entity'; import { FeatureStoreSearchIndexStrategyOptions } from '../feature.interfaces'; import { FeatureStore } from '../store'; /** * * This strategy loads a layer's features's properties into a searchable index. */ export declare class FeatureStoreSearchIndexStrategy extends EntityStoreStrategy { protected options: FeatureStoreSearchIndexStrategyOptions; /** * Subscription to the store's OL source changes */ private stores$$; constructor(options: FeatureStoreSearchIndexStrategyOptions); /** * Bind this strategy to a store and start watching for entities changes * @param store Feature store */ bindStore(store: FeatureStore): void; /** * Unbind this strategy from a store and stop watching for entities changes * @param store Feature store */ unbindStore(store: FeatureStore): void; /** * Start watching all stores already bound to that strategy at once. * @internal */ protected doActivate(): void; /** * Stop watching all stores bound to that strategy * @internal */ protected doDeactivate(): void; private initStoreSearchIndex; /** * Watch for a store's entities changes * @param store Feature store */ private watchStore; /** * Stop watching for a store's entities changes * @param store Feature store */ private unwatchStore; /** * Stop watching for OL source changes in all stores. */ private unwatchAll; /** * Maintain searcahble index for every loaded entities * @param store Feature store */ private onEntitiesChanges; }