Class: printDirective directive:gmfPrint

gmf.printDirective

new printDirective(gmfPrintTemplateUrl)

Provide a directive that display a print panel. This panel is populated with a form corresponding to the capabilities delivered by a GMF print v3 server. If you want to use another template for your print panel, you can see the available layout information in the 'gmfx.PrintLayoutInfo' classes.

Simple example:

 <gmf-print
   gmf-print-map="mainCtrl.map"
   gmf-print-active="printActive"
   gmf-print-rotatemask="true">
 </gmf-print>

Example with user defined attribute:

 <gmf-print
   gmf-print-map="mainCtrl.map"
   gmf-print-active="printActive"
   gmf-print-rotatemask="true"
   gmf-print-hiddenfields="['name']"
   gmf-print-attributes-out="attributes">
   <div ng-repeat="attribute in attributes">
     <div ng-if="attribute.name == 'name'">
       <input ng-model="attribute.value" placeholder="name" />
     </div>
   </div>
 </gmf-print>

Note: The 'print' and 'cancel' functions can also be called via globals events 'gmfStartPrint' and 'gmfCancelPrint'.

HTML attributes:
Name Type Description
gmf-print-map ol.Map The map.
gmf-print-active boolean A boolean that informs if the panel is open or not.
gmf-print-rotatemask boolean Optional. True to apply rotation on the mask instead of the map. By default, the map rotates.
gmf-print-fieldvalues Object:.<string:, (string:|number:|boolean:)> optional. Key, value object to define default value in each of your print panel field. The key refers to the property's name of the field. Example: {'comments': 'demo', 'legend': false}. Doesn't work for the dpi and the scale. Server's values are used in priorty.
gmf-print-hiddenattributes Array:.<string:> The list of attributes that should be hidden.
Returns:
angular.Directive

Directive Definition Object.