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 boolean Whether the directive is active or not.
ngeo-createfeature-features ol.Collection The collection of features where to add those created by this directive.
ngeo-createfeature-geom-type string Determines the type of geometry this directive should draw.
ngeo-createfeature-map ol.Map The map.
Returns:
angular.Directive

The directive specs.