PopupModifierManager
Allow the registration of PopupModifiers via the PopupModifier API. Registration: map.api.popupModifier.register(name, popupModifier)
map.api.popupModifier.register('modification', (content, map) => {
return {
name: content.name,
description: content.description.replace(/f/g, 'k')
}
})
Configuration: Layer specific modifiers need to be enabled in the layer object and can be referenced in an array. It is supported for Vector layers and featureInfo enabled WMS layers.
{
"type": "KML",
"popupModifiers": ["modification"],
...
}
Or it can be done globally in the FeaturePopup configuration.
"featurePopup": {
"popupModifiers": ["modification"],
...
}
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Private Members | ||
private |
popupModifiers_: Map<string, PopupModifier> |
Method Summary
Public Methods | ||
public |
apply(popupContent: PopupContent, map: G4UMap, popupModifiers: string[]): Promise<PopupContent> |
|
public |
register a text mutator with a name. |
Public Constructors
public constructor() source
Public Methods
public apply(popupContent: PopupContent, map: G4UMap, popupModifiers: string[]): Promise<PopupContent> source
Params:
Name | Type | Attribute | Description |
popupContent | PopupContent | ||
map | G4UMap | ||
popupModifiers | string[] |