new GeometryLinearRing(points)
Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/openlayers/iclient-ol.js"></script>
<script>
  new ol.supermap.Geometry.LinearRing(points);
  
  // 弃用的写法
  new SuperMap.Geometry.LinearRing(points);
</script>
// ES6 Import
import { GeometryLinearRing } from '@supermapgis/iclient-ol';
new GeometryLinearRing(points);
        
        
        | Name | Type | Description | 
|---|---|---|
points | 
            
            
            Array.<GeometryPoint> | 
                
                 组成线性环的点。  | 
        
Example
var points = [new GeometryPoint(4933.319287022352, -3337.3849141502124),
     new GeometryPoint(4960.9674060199022, -3349.3316322355736),
     new GeometryPoint(5006.0235999418364, -3358.8890067038628),
     new GeometryPoint(5075.3145648369318, -3378.0037556404409),
     new GeometryPoint(5305.19551436013, -3376.9669111768926)],
var linearRing = new GeometryLinearRing(points);
    
    
Extends
Members
- 
    
boundsBounds
 - 
    
    
几何对象的范围。
 - 
    
componentsArray.<Geometry>
 - 
    
    
存储几何对象的数组。
 - 
    
componentTypesArray.<string>
 - 
    
    
components 存储的几何对象所支持的几何类型数组,为空表示类型不受限制。
- Default Value: ["SuperMap.Geometry.Point"]
 
 
idstring
几何对象的唯一标识符。
parentGeometry
父类几何对象。
SRIDnumber
投影坐标参数。通过该参数,服务器判断几何对象的坐标参考系是否与数据集相同,如果不同,则在数据入库前进行投影变换。
Example
var geometry= new Geometry();
geometry. SRID=4326;
    
    
    
Methods
- 
    
addComponent(point, index){boolean}
common/commontypes/geometry/LinearRing.js, line 54 - 
    
    
添加一个点到几何图形数组中,如果这个点将要被添加到组件数组的末端,并且与数组中已经存在的最后一个点相同, 重复的点是不能被添加的。这将影响未关闭环的关闭。 这个方法可以通过将非空索引(组件数组的下标)作为第二个参数重写。
Name Type Description pointGeometryPoint 点对象。
indexnumber 可选 插入组件数组的下标。
Returns:
Type Description boolean 点对象是否添加成功。  - 
    
inherited addComponents(components)
common/commontypes/geometry/Collection.js, line 109 - 
    
    
给几何图形对象添加元素。
Name Type Description componentsArray.<Geometry> 几何对象组件。
Example
var geometryCollection = new GeometryCollection(); geometryCollection.addComponents(new SuerpMap.Geometry.Point(10,10)); - 
    
inherited addPoint(point, index)
common/commontypes/geometry/MultiPoint.js, line 35 - 
    
    
添加点,封装了 GeometryCollection.addComponent 方法。
Name Type Description pointGeometryPoint 添加的点。
indexnumber 可选 下标。
 - 
    
inherited calculateBounds()
common/commontypes/geometry/Collection.js, line 88 - 
    
    
通过遍历数组重新计算边界,在遍历每一子项中时调用 extend 方法。
 - 
    
inherited clearBounds()
common/commontypes/Geometry.js, line 85 - 
    
    
清除几何对象的边界。 如果该对象有父类,也会清除父类几何对象的边界。
 - 
    
inherited clone(){GeometryCollection}
common/commontypes/geometry/Collection.js, line 58 - 
    
    
克隆当前几何对象。
Returns:
Type Description GeometryCollection 克隆的几何对象集合。  - 
    
inherited destroy()
common/commontypes/geometry/Collection.js, line 48 - 
    
    
销毁几何图形。
 - 
    
inherited equals(geometry){boolean}
common/commontypes/geometry/Collection.js, line 203 - 
    
    
判断两个几何对象是否相等。如果所有的 components 具有相同的坐标,则认为是相等的。
Name Type Description geometryGeometry 需要判断的几何对象。
Returns:
Type Description boolean 输入的几何对象与当前几何对象是否相等。  - 
    
inherited extendBounds(newBounds)
common/commontypes/Geometry.js, line 98 - 
    
    
扩展现有边界以包含新边界。如果尚未设置几何边界,则设置新边界。
Name Type Description newBoundsBounds 几何对象的边界。
 - 
    
getArea(){number}
common/commontypes/geometry/LinearRing.js, line 102 - 
    
    
获得当前几何对象区域大小,如果是沿顺时针方向的环则是正值,否则为负值。
Returns:
Type Description number 环的面积。  - 
    
    
获得几何图形的边界。如果没有设置边界,可通过计算获得。
Returns:
Type Description Bounds 几何对象的边界。  - 
    
inherited getComponentsString(){string}
common/commontypes/geometry/Collection.js, line 75 - 
    
    
获取 components 字符串。
Returns:
Type Description string components 字符串。  - 
    
inherited getSortedSegments(){Array}
common/commontypes/geometry/LineString.js, line 46 - 
    
    
获取升序排列的点坐标对象数组。
Returns:
Type Description Array 升序排列的点坐标对象数组。  - 
    
getVertices(nodes){Array}
common/commontypes/geometry/LinearRing.js, line 121 - 
    
    
返回几何图形的所有点的列表。
Name Type Description nodesboolean 可选 对于线来说,仅仅返回作为端点的顶点,如果设为 false ,则返回非端点的顶点,如果没有设置此参数,则返回所有顶点。
Returns:
Type Description Array 几何对象所有点的列表。  - 
    
removeComponent(point){boolean}
common/commontypes/geometry/LinearRing.js, line 81 - 
    
    
从几何组件中删除一个点。
Name Type Description pointGeometryPoint 点对象。
Returns:
Type Description boolean 点对象是否删除。  - 
    
inherited removeComponents(components){boolean}
common/commontypes/geometry/Collection.js, line 157 - 
    
    
清除几何对象。
Name Type Description componentsArray.<Geometry> 需要清除的几何对象。
Returns:
Type Description boolean 元素是否被删除。  - 
    
inherited removePoint(point)
common/commontypes/geometry/MultiPoint.js, line 46 - 
    
    
移除点,封装了 GeometryCollection.removeComponent 方法。
Name Type Description pointGeometryPoint 移除的点对象。
 - 
    
inherited setBounds(bounds)
common/commontypes/Geometry.js, line 73 - 
    
    
设置几何对象的边界。
Name Type Description boundsBounds 范围。