[185] | 1 | .. _api-zoo-feature: |
---|
| 2 | |
---|
| 3 | ZOO.Feature |
---|
| 4 | =========== |
---|
| 5 | |
---|
| 6 | Vector features use the ZOO.Geometry classes as geometry description. |
---|
| 7 | |
---|
[186] | 8 | Properties |
---|
| 9 | ---------- |
---|
[185] | 10 | |
---|
| 11 | .. list-table:: |
---|
[186] | 12 | :widths: 12 50 |
---|
[185] | 13 | :header-rows: 1 |
---|
| 14 | |
---|
| 15 | * - NAME |
---|
| 16 | - DESCRIPTION |
---|
| 17 | * - :ref:`fid <fid>` |
---|
| 18 | - {String} |
---|
| 19 | * - :ref:`geometry <geometry>` |
---|
| 20 | - {ZOO.Geometry} |
---|
| 21 | * - :ref:`attributes <attributes>` |
---|
| 22 | - {Object} This object holds arbitrary properties that describe the feature. |
---|
| 23 | * - :ref:`bounds <bounds>` |
---|
| 24 | - {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. |
---|
[186] | 25 | |
---|
| 26 | Functions |
---|
| 27 | --------- |
---|
| 28 | |
---|
| 29 | .. list-table:: |
---|
| 30 | :widths: 15 50 |
---|
| 31 | :header-rows: 1 |
---|
| 32 | |
---|
| 33 | * - NAME |
---|
| 34 | - DESCRIPTION |
---|
| 35 | * - :ref:`ZOO.Feature <ZOO.Feature>` |
---|
| 36 | - Create a vector feature. |
---|
| 37 | * - :ref:`destroy <destroy>` |
---|
| 38 | - nullify references to prevent circular references and memory leaks |
---|
| 39 | * - :ref:`clone <clone>` |
---|
| 40 | - Create a clone of this vector feature. |
---|
| 41 | * - :ref:`move <move>` |
---|
| 42 | - Moves the feature and redraws it at its new location |
---|
| 43 | |
---|
[185] | 44 | |
---|
| 45 | **Properties** |
---|
| 46 | |
---|
| 47 | .. _fid: |
---|
| 48 | |
---|
| 49 | fid |
---|
| 50 | ``{String}`` |
---|
| 51 | |
---|
| 52 | .. _geometry: |
---|
| 53 | |
---|
| 54 | geometry |
---|
| 55 | :ref:`{ZOO.Geometry} <api-zoo-geometry>` |
---|
| 56 | |
---|
| 57 | .. _attributes: |
---|
| 58 | |
---|
| 59 | attributes |
---|
| 60 | ``{Object}`` This object holds arbitrary properties that describe the feature. |
---|
| 61 | |
---|
| 62 | .. _bounds: |
---|
| 63 | |
---|
| 64 | bounds |
---|
| 65 | :ref:`{ZOO.Bounds} <api-zoo-bounds>` The box bounding that feature's geometry, that |
---|
| 66 | property can be set by an ZOO.Format object when deserializing the feature, so in most cases |
---|
| 67 | it represents an information set by the server. |
---|
| 68 | |
---|
[186] | 69 | **Functions** |
---|
| 70 | |
---|
| 71 | .. _ZOO.Feature: |
---|
| 72 | |
---|
| 73 | ZOO.Feature |
---|
| 74 | Create a vector feature. |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | *Parameters* |
---|
| 78 | |
---|
| 79 | | ``geometry`` :ref:`{ZOO.Geometry} <api-zoo-geometry>` The geometry that this feature represents. |
---|
| 80 | | ``attributes {Object}`` An optional object that will be mapped to the attributes property. |
---|
| 81 | |
---|
| 82 | .. _destroy: |
---|
| 83 | |
---|
| 84 | destroy |
---|
| 85 | :: |
---|
| 86 | |
---|
| 87 | destroy: function() |
---|
| 88 | |
---|
| 89 | nullify references to prevent circular references and memory leaks |
---|
| 90 | |
---|
| 91 | .. _clone: |
---|
| 92 | |
---|
| 93 | clone |
---|
| 94 | :: |
---|
| 95 | |
---|
| 96 | clone: function () |
---|
| 97 | |
---|
| 98 | Create a clone of this vector feature. Does not set any non-standard properties. |
---|
| 99 | |
---|
| 100 | *Returns* |
---|
| 101 | |
---|
| 102 | :ref:`{ZOO.Feature} <api-zoo-feature>` An exact clone of this vector feature. |
---|
| 103 | |
---|
| 104 | .. _move: |
---|
| 105 | |
---|
| 106 | move |
---|
| 107 | Moves the feature and redraws it at its new location |
---|