Methods
(static) getFeatureTypeName(feature) → {String}
Returns the featureType name out of a given feature. It assumes that the feature has an ID in the following structure FEATURETYPE.FEATUREID.
Parameters:
Name | Type | Description |
---|---|---|
feature |
ol.Feature | The feature to obtain the featureType name from. |
- Source:
Returns:
The (unqualified) name of the featureType or undefined if the name could not be picked.
- Type
- String
(static) resolveAttributeTemplate(feature, template, noValueFoundText) → {String}
Resolves the given template string with the given feature attributes, e.g. the template "Size of area is {{AREA_SIZE}} km²" would be to resolved to "Size of area is 1909 km²" (assuming the feature's attribute AREA_SIZE really exists).
Parameters:
Name | Type | Default | Description |
---|---|---|---|
feature |
ol.Feature | The feature to get the attributes from. |
|
template |
String | The template string to resolve. |
|
noValueFoundText |
String | n.v. | The text to apply, if the templated value could not be found, default is to 'n.v.'. |
- Source:
Returns:
The resolved template string.
- Type
- String