import { FeatureOverlay } from 'ngeo/map/FeatureOverlay'; import olLayerVector from 'ol/layer/Vector'; import olSourceVector from 'ol/source/Vector'; import OlSourceVector from 'ol/source/Vector'; import OlGeomGeometry from 'ol/geom/Geometry'; import OlLayerVector from 'ol/layer/Vector'; import { StyleFunction as OlStyleStyleStyleFunction } from 'ol/style/Style'; import OlFeature from 'ol/Feature'; import OlMap from 'ol/Map'; import { StyleLike as OlStyleStyleStyleLike } from 'ol/style/Style'; import OlRenderFeature from 'ol/render/Feature'; import OlStyleStyle from 'ol/style/Style'; type MapFeatureOverlayGroup = { styleFunction: OlStyleStyleStyleFunction; features: { [x: string]: OlFeature; }; }; /** * Provides a service that wraps an "unmanaged" vector layer, * used as a shared vector layer across the application. * * Example: * * The application's main component/controller initializes the feature * overlay manager with the map: * * ngeoFeatureOverlayMgr.init(map); * * Once initialized, components of the application can use the manager to * create a feature overlay, configuring it with specific styles: * * let featureOverlay = ngeoFeatureOverlayMgr.getFeatureOverlay(); * featureOverlay.setStyle(myStyle); * featureOverlay.addFeature(myFeature); */ export declare class FeatureOverlayMgr { featureUidToGroupIndex_: { [x: string]: number; }; groups_: MapFeatureOverlayGroup[]; source_: OlSourceVector>; layer_: OlLayerVector>>; constructor(); /** * @param {number} groupIndex The group groupIndex. * @returns {boolean} True if the group has no features. False otherwise. */ isEmpty(groupIndex: number): boolean; /** * @param {OlFeature} feature The feature to add. * @param {number} groupIndex The group groupIndex. */ addFeature(feature: OlFeature, groupIndex: number): void; /** * @param {OlFeature} feature The feature to add. * @param {number} groupIndex The group groupIndex. */ removeFeature(feature: OlFeature, groupIndex: number): void; /** * @param {number} groupIndex The group groupIndex. */ clear(groupIndex: number): void; /** * @returns {olLayerVector>} The vector layer used internally. */ getLayer(): olLayerVector>>; /** * @returns {FeatureOverlay} Feature overlay. */ getFeatureOverlay(): FeatureOverlay; /** * @param {OlMap} map Map. */ init(map: OlMap): void; /** * @param {OlStyleStyleStyleLike} style Style to apply. * @param {number} groupIndex Group index. */ setStyle(style: OlStyleStyleStyleLike, groupIndex: number): void; /** * @param {OlFeature|OlRenderFeature} feature Feature. * @param {number} resolution Resolution. * @returns Styles. */ styleFunction_(feature: OlFeature | OlRenderFeature, resolution: number): void | OlStyleStyle | OlStyleStyle[]; } declare const featureOverlayMgr: FeatureOverlayMgr; export default featureOverlayMgr;