| 1 | define([ |
| 2 | "dojo/_base/declare" |
| 3 | ], function(declare){ |
| 4 | |
| 5 | return declare("dojox.geo.openlayers.Geometry", null, { |
| 6 | // summary: |
| 7 | // A Geometry handles description of shapes to be rendered in a GfxLayer |
| 8 | // using a GeometryFeature feature. |
| 9 | // A Geometry can be: |
| 10 | // |
| 11 | // - A point geometry of type dojox.geo.openlayers.Point. Coordinates are a an |
| 12 | // Object {x, y} |
| 13 | // - A line string geometry of type dojox.geo.openlayers.LineString. Coordinates are |
| 14 | // an array of {x, y} objects |
| 15 | // - A collection geometry of type dojox.geo.openlayers.Collection. Coordinates are an array of geometries. |
| 16 | |
| 17 | // coordinates: Object|Array |
| 18 | // The coordinates of the geometry, Object like {x, y} or Array. |
| 19 | coordinates : null, |
| 20 | |
| 21 | // shape: [private] dojox/gfx/shape.Shape |
| 22 | // The associated shape when rendered |
| 23 | shape: null, |
| 24 | |
| 25 | constructor: function(coords){ |
| 26 | // summary: |
| 27 | // Constructs a new geometry |
| 28 | // coords: Object |
| 29 | // Coordinates of the geometry. {x:``x``, y:``y``} object for a point geometry, array of {x:``x``, y:``y``} |
| 30 | // objects for line string geometry, array of geometries for collection geometry. |
| 31 | this.coordinates = coords; |
| 32 | } |
| 33 | }); |
| 34 | }); |