new Geometry()
Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
  new L.supermap.Geometry();
  
  // 弃用的写法
  new SuperMap.Geometry();
</script>
// ES6 Import
import { Geometry } from '@supermapgis/iclient-leaflet';
new Geometry();
        
        
        
            common/commontypes/Geometry.js, line 8
        
        
    Members
- 
    boundsBounds
- 
    
    几何对象的范围。 
- 
    idstring
- 
    
    几何对象的唯一标识符。 
- 
    parentGeometry
- 
    
    父类几何对象。 
- 
    SRIDnumber
- 
    
    投影坐标参数。通过该参数,服务器判断几何对象的坐标参考系是否与数据集相同,如果不同,则在数据入库前进行投影变换。 Examplevar geometry= new Geometry(); geometry. SRID=4326;
Methods
- 
    calculateBounds()common/commontypes/Geometry.js, line 126
- 
    
    重新计算几何图形的边界(需要在子类中实现此方法)。 
- 
    clearBounds()common/commontypes/Geometry.js, line 85
- 
    
    清除几何对象的边界。 如果该对象有父类,也会清除父类几何对象的边界。 
- 
    clone(){Geometry}common/commontypes/Geometry.js, line 63
- 
    
    克隆几何图形。克隆的几何图形不设置非标准的属性。 Returns:Type Description Geometry 克隆的几何图形。 
- 
    destroy()common/commontypes/Geometry.js, line 52
- 
    
    解构 Geometry 类,释放资源。 
- 
    extendBounds(newBounds)common/commontypes/Geometry.js, line 98
- 
    
    扩展现有边界以包含新边界。如果尚未设置几何边界,则设置新边界。 Name Type Description newBoundsBounds 几何对象的边界。 
- 
    getArea(){number}common/commontypes/Geometry.js, line 145
- 
    
    计算几何对象的面积 ,此方法需要在子类中定义。 Returns:Type Description number 计算后的对象面积。 
- 
    getBounds(){Bounds}common/commontypes/Geometry.js, line 113
- 
    
    获得几何图形的边界。如果没有设置边界,可通过计算获得。 Returns:Type Description Bounds 几何对象的边界。 
- 
    getVertices(nodes){Array}common/commontypes/Geometry.js, line 136
- 
    
    返回几何图形的所有顶点的列表(需要在子类中实现此方法)。 Name Type Description nodesboolean 可选 如果是 true,线则只返回线的末端点,如果 false,仅仅返回顶点,如果没有设置,则返回顶点。 Returns:Type Description Array 几何图形的顶点列表。 
- 
    setBounds(bounds)common/commontypes/Geometry.js, line 73
- 
    
    设置几何对象的边界。 Name Type Description boundsBounds 范围。