new SuperMap.Geometry.Curve(components)
| Name | Type | Description | 
|---|---|---|
| components | Array.<SuperMap.Geometry.Point> | 几何对象数组。 | 
Example
var point1 = new SuperMap.Geometry.Point(10,20);
var point2 = new SuperMap.Geometry.Point(30,40);
var curve = new SuperMap.Geometry.Curve([point1,point2]);Extends
Members
- 
    boundsSuperMap.Bounds
- 
    
    几何对象的范围。 
- 
    componentsArray.<SuperMap.Geometry>
- 
    
    存储几何对象的数组。 
- 
    componentTypeArray.<string>
- 
    
    components 存储的的几何对象所支持的几何类型数组。 - Default Value: ["SuperMap.Geometry.Point", "SuperMap.PointWithMeasure"]
 
componentTypesArray.<string>
components 存储的的几何对象所支持的几何类型数组。
- Default Value: ["SuperMap.Geometry.Point"]
idstring
此几何对象的唯一标示符。
parentSuperMap.Geometry
This is set when a Geometry is added as component of another geometry
SRIDinterger
投影坐标参数。通过该参数,服务器判断 Geometry 对象的坐标参考系是否与数据集相同,如果不同,则在数据入库前进行投影变换。
Example
var geometry= new SuperMap.Geometry();
  geometry. SRID=4326;Methods
- 
    inherited addComponent(component, index){boolean}common/commontypes/geometry/Collection.js, line 123
- 
    
    
    添加一个几何对象到集合中。如果设置了 componentTypes 类型,则添加的几何对象必须是 componentTypes 中的类型。 Name Type Description componentSuperMap.Geometry 待添加的几何对象。 indexint 可选 几何对象插入的位置。 Returns:Type Description boolean 是否添加成功。 
- 
    inherited addComponents(components)common/commontypes/geometry/Collection.js, line 106
- 
    
    
    给几何图形对象添加元素。 Name Type Description componentsArray.<SuperMap.Geometry> 几何对象组件。 Examplevar collection = new SuperMap.Geometry.Collection(); collection.addComponents(new SuerpMap.Geometry.Point(10,10));
- 
    inherited addPoint(point, index)common/commontypes/geometry/MultiPoint.js, line 32
- 
    
    
    添加点,封装了 SuperMap.Geometry.Collection.addComponent 方法。 Name Type Description pointSuperMap.Geometry.Point 添加的点。 indexinteger 可选 下标。 
- 
    inherited calculateBounds()common/commontypes/geometry/Collection.js, line 85
- 
    
    
    通过遍历数组重新计算边界,在遍历每一子项中时调用 extend 方法。 
- 
    inherited clearBounds()common/commontypes/Geometry.js, line 85
- 
    
    
    清除几何对象的 bounds。 如果该对象有父类,也会清除父类几何对象的 bounds。 
- 
    inherited clone(){SuperMap.Geometry.Collection}common/commontypes/geometry/Collection.js, line 55
- 
    
    
    克隆当前几何对象。 Returns:Type Description SuperMap.Geometry.Collection 克隆的几何对象集合。 
- 
    inherited destroy()common/commontypes/geometry/Collection.js, line 45
- 
    
    
    销毁几何图形。 
- 
    inherited equals(geometry){boolean}common/commontypes/geometry/Collection.js, line 200
- 
    
    
    判断两个几何图形是否相等。如果所有的 components 具有相同的坐标,则认为是相等的。 Name Type Description geometrySuperMap.Geometry 需要判断的几何图形。 Returns:Type Description boolean 输入的几何图形与当前几何图形是否相等。 
- 
    inherited extendBounds(newBounds)common/commontypes/Geometry.js, line 98
- 
    
    
    Extend the existing bounds to include the new bounds. If geometry's bounds is not yet set, then set a new Bounds. Name Type Description newBoundsSuperMap.Bounds 范围。 
- 
    inherited getArea(){number}common/commontypes/geometry/Collection.js, line 187
- 
    
    
    计算几何对象的面积。注意,这个方法在 SuperMap.Geometry.Polygon 类中需要重写。 Returns:Type Description number 几何图形的面积,是几何对象中所有组成部分的面积之和。 
- 
    inherited getBounds(){SuperMap.Bounds}common/commontypes/Geometry.js, line 115
- 
    
    
    获得几何图形的边界。如果没有设置边界,可通过计算获得。 Returns:Type Description SuperMap.Bounds 返回的几何对象的边界。 
- 
    inherited getComponentsString(){string}common/commontypes/geometry/Collection.js, line 72
- 
    
    
    获取 components 字符串。 Returns:Type Description string components 字符串。 
- 
    inherited getVertices(nodes){Array}common/commontypes/geometry/Collection.js, line 226
- 
    
    
    返回几何对象的所有结点的列表。 Name Type Description nodesboolean 可选 对于线来说,仅仅返回作为端点的顶点,如果设为 false,则返回非端点的顶点如果没有设置此参数,则返回所有顶点。 Returns:Type Description Array 几何对象的顶点列表。 
- 
    inherited removeComponent(component){boolean}common/commontypes/geometry/Collection.js, line 172
- 
    
    
    从集合中移除一个几何对象。 Name Type Description componentSuperMap.Geometry 要移除的几何对象。 Returns:Type Description boolean 几何对象是否移除成功。 
- 
    inherited removeComponents(components){boolean}common/commontypes/geometry/Collection.js, line 154
- 
    
    
    清除几何对象。 Name Type Description componentsArray.<SuperMap.Geometry> 需要清除的几何对象。 Returns:Type Description boolean 元素是否被删除。 
- 
    inherited removePoint(point)common/commontypes/geometry/MultiPoint.js, line 43
- 
    
    
    移除点,封装了 SuperMap.Geometry.Collection.removeComponent 方法。 Name Type Description pointSuperMap.Geometry.Point 移除的点对象。 
- 
    inherited setBounds(bounds)common/commontypes/Geometry.js, line 73
- 
    
    
    设置此几何对象的 bounds。 Name Type Description boundsSuperMap.Bounds 范围。