.. _api-zoo-feature: ZOO.Feature =========== Vector features use the ZOO.Geometry classes as geometry description. Properties ---------- .. list-table:: :widths: 12 50 :header-rows: 1 * - NAME - DESCRIPTION * - :ref:`fid ` - {String} * - :ref:`geometry ` - {ZOO.Geometry} * - :ref:`attributes ` - {Object} This object holds arbitrary properties that describe the feature. * - :ref:`bounds ` - {ZOO.Bounds} The box bounding that feature's geometry, that property can be set by an ZOO.Format object when deserializing the feature, so in most cases it represents an information set by the server. Functions --------- .. list-table:: :widths: 15 50 :header-rows: 1 * - NAME - DESCRIPTION * - :ref:`ZOO.Feature ` - Create a vector feature. * - :ref:`destroy ` - nullify references to prevent circular references and memory leaks * - :ref:`clone ` - Create a clone of this vector feature. * - :ref:`move ` - Moves the feature and redraws it at its new location **Properties** .. _fid: fid ``{String}`` .. _geometry: geometry :ref:`{ZOO.Geometry} ` .. _attributes: attributes ``{Object}`` This object holds arbitrary properties that describe the feature. .. _bounds: bounds :ref:`{ZOO.Bounds} ` The box bounding that feature's geometry, that property can be set by an ZOO.Format object when deserializing the feature, so in most cases it represents an information set by the server. **Functions** .. _ZOO.Feature: ZOO.Feature Create a vector feature. *Parameters* | ``geometry`` :ref:`{ZOO.Geometry} ` The geometry that this feature represents. | ``attributes {Object}`` An optional object that will be mapped to the attributes property. .. _destroy: destroy :: destroy: function() nullify references to prevent circular references and memory leaks .. _clone: clone :: clone: function () Create a clone of this vector feature. Does not set any non-standard properties. *Returns* :ref:`{ZOO.Feature} ` An exact clone of this vector feature. .. _move: move Moves the feature and redraws it at its new location