UNPKG

@igo2/geo

Version:
62 lines (61 loc) 2.17 kB
import { EntityStoreStrategy } from '@igo2/common/entity'; import { CapabilitiesService } from '../../../datasource/shared/capabilities.service'; import { PropertyTypeDetectorService } from '../../../utils/propertyTypeDetector/propertyTypeDetector.service'; import { FeatureStorePropertyTypeStrategyOptions } from '../feature.interfaces'; import { FeatureStore } from '../store'; /** * This strategy maintain the store features updated to detect geoproperties * (wms/arcgis... layer and url). * The features's state inside the map are tagged haveGeoServiceProperties = true; */ export declare class GeoPropertiesStrategy extends EntityStoreStrategy { protected options: FeatureStorePropertyTypeStrategyOptions; private propertyTypeDetectorService; private capabilitiesService; /** * Subscription to the store's OL source changes */ private stores$$; private states$$; private empty$$; /** * The map the layer is bound to */ private readonly map; constructor(options: FeatureStorePropertyTypeStrategyOptions, propertyTypeDetectorService: PropertyTypeDetectorService, capabilitiesService: CapabilitiesService); /** * Bind this strategy to a store and start watching for Ol source changes * @param store Feature store */ bindStore(store: FeatureStore): void; /** * Unbind this strategy from a store and stop watching for Ol source 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; /** * Watch for a store's OL source changes * @param store Feature store */ private watchStore; private updateEntitiesPropertiesState; /** * Stop watching for a store's OL source changes * @param store Feature store */ private unwatchStore; /** * Stop watching for OL source changes in all stores. */ private unwatchAll; }