new component_()
Provide a directive that set a value each 500ms with the elevation under the mouse cursor position on the map. The value must come from the elevation service of a c2cgeoportal server. The server's URL must be defined as config value of the application.
Example:
<span gmf-elevation
gmf-elevation-active="elevationActive"
gmf-elevation-elevation="elevationValue"
gmf-elevation-layer="mainCtrl.elevationLayer"
gmf-elevation-layersconfig="::mainCtrl.elevationLayersConfig"
gmf-elevation-map="::mainCtrl.map">
{{elevationValue}}
</span>
For value in meter elevationLayersConfig
can be an empty object, complex example:
elevationLayersConfig = {
'<layer>': {
'filter': 'ngeoUnitPrefix',
'args': ['m²', 'square'],
'postfix': '<notice>',
'separator': ''
}
};
HTML attributes:
Name | Type | Description |
---|---|---|
gmf-elevation-active |
boolean | A boolean to set active or deactive the component. |
gmf-elevation-elevation |
number | The value to set with the elevation value. |
gmf-elevation-layer |
string | Elevation layer to use. |
gmf-elevation-layersconfig |
Object:.<string:, gmf.raster.component.LayerConfig:> | Elevation layer configurations. |
gmf-elevation-map |
ol.Map | The map. |
Returns:
angular.Directive
Directive Definition Object.