Class: createfeatureDirective directive:ngeoCreatefeature

ngeo.createfeatureDirective

new createfeatureDirective()

A directive used to draw vector features of a single geometry type using either a 'draw' or 'measure' interaction. Once a feature is finished being drawn, it is added to a collection of features.

The geometry types supported are:

  • Point
  • LineString
  • Polygon

Example:

<a
  href
  translate
  ngeo-btn
  ngeo-createfeature
  ngeo-createfeature-active="ctrl.createPointActive"
  ngeo-createfeature-features="ctrl.features"
  ngeo-createfeature-geom-type="ctrl.pointGeomType"
  ngeo-createfeature-map="::ctrl.map"
  class="btn btn-default ngeo-createfeature-point"
  ng-class="{active: ctrl.createPointActive}"
  ng-model="ctrl.createPointActive">
</a>
HTML attributes:
Name Type Description
ngeo-createfeature-active Whether the directive is active or not.
ngeo-createfeature-features The collection of features where to add those created by this directive.
ngeo-createfeature-geom-type Determines the type of geometry this directive should draw.
ngeo-createfeature-map The map.
Returns:
angular.Directive

The directive specs.