# Class FeatureOverlayMgr

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);

- Defined in src/map/FeatureOverlayMgr.ts:64

#####
Index

### Constructors

constructor

### Properties

featureUidToGroupIndex_
groups_
layer_
source_

### Methods

addFeature
clear
getFeatureOverlay
getLayer
init
isEmpty
removeFeature
setStyle
styleFunction_

## Constructors

### constructor

- new FeatureOverlayMgr(): FeatureOverlayMgr

- #### Returns FeatureOverlayMgr

  - Defined in src/map/FeatureOverlayMgr.ts:73

## Properties

### featureUidToGroupIndex_

featureUidToGroupIndex_: {
[x: string]: number;
}

#### Type declaration

- ##### [x: string]: number

- Defined in src/map/FeatureOverlayMgr.ts:65

### groups_

groups_: MapFeatureOverlayGroup[]

- Defined in src/map/FeatureOverlayMgr.ts:67

### layer_

layer_: VectorLayer<VectorSource<Geometry>>

- Defined in src/map/FeatureOverlayMgr.ts:71

### source_

source_: VectorSource<Geometry>

- Defined in src/map/FeatureOverlayMgr.ts:69

## Methods

### addFeature

- addFeature(feature, groupIndex): void

- #### Parameters

  - ##### feature: Feature<Geometry>

    The feature to add.

  - ##### groupIndex: number

    The group groupIndex.

  #### Returns void

  - Defined in src/map/FeatureOverlayMgr.ts:102

### clear

- clear(groupIndex): void

- #### Parameters

  - ##### groupIndex: number

    The group groupIndex.

  #### Returns void

  - Defined in src/map/FeatureOverlayMgr.ts:127

### getFeatureOverlay

- getFeatureOverlay(): FeatureOverlay

- #### Returns FeatureOverlay

  Feature overlay.

  - Defined in src/map/FeatureOverlayMgr.ts:147

### getLayer

- getLayer(): VectorLayer<VectorSource<Geometry>>

- #### Returns VectorLayer<VectorSource<Geometry>>

  The vector layer used internally.

  - Defined in src/map/FeatureOverlayMgr.ts:140

### init

- init(map): void

- #### Parameters

  - ##### map: Map

    Map.

  #### Returns void

  - Defined in src/map/FeatureOverlayMgr.ts:159

### isEmpty

- isEmpty(groupIndex): boolean

- #### Parameters

  - ##### groupIndex: number

    The group groupIndex.

  #### Returns boolean

  True if the group has no features. False otherwise.

  - Defined in src/map/FeatureOverlayMgr.ts:92

### removeFeature

- removeFeature(feature, groupIndex): void

- #### Parameters

  - ##### feature: Feature<Geometry>

    The feature to add.

  - ##### groupIndex: number

    The group groupIndex.

  #### Returns void

  - Defined in src/map/FeatureOverlayMgr.ts:115

### setStyle

- setStyle(style, groupIndex): void

- #### Parameters

  - ##### style: StyleLike

    Style to apply.

  - ##### groupIndex: number

    Group index.

  #### Returns void

  - Defined in src/map/FeatureOverlayMgr.ts:167

### styleFunction_

- styleFunction_(feature, resolution): void | Style | Style[]

- #### Parameters

  - ##### feature: Feature<Geometry> | RenderFeature

    Feature.

  - ##### resolution: number

    Resolution.

  #### Returns void | Style | Style[]

  Styles.

  - Defined in src/map/FeatureOverlayMgr.ts:178

Generated using TypeDoc