Class: contextualdataDirective directive:gmfContextualdata

gmf.contextualdataDirective

new contextualdataDirective()

Provide a directive responsible of displaying contextual data after a right click on the map.

This directive doesn't require being rendered in a visible DOM element. It's usually added to the element where the map directive is also added.

Example:

<gmf-map gmf-map-map="mainCtrl.map"
    gmf-contextualdata
    gmf-contextualdata-map="::mainCtrl.map"
    gmf-contextualdata-projections="::[21781,4326]">

The content of the popover is managed in a partial that must be defined using the gmfContextualdatacontentTemplateUrl value. See gmf.contextualdatacontentDirective for more details.

One can also provide a gmf-contextualdata-callback attribute in order to do some additional computing on the coordinate or the values received for the raster service. The callback function is called with the coordinate of the clicked point and the response data from the server. It is intended to return an object of additional properties to add to the scope.

See the ../examples/contribs/gmf/contextualdata.html example for a usage sample.

HTML attributes:
Name Type Description
map The map.
projections The list of projections.
callback A function called after server (raster) data is received in case some additional computing is required. Optional.
Returns:
angular.Directive

The directive specs.