new SuperMap.Geometry.Rectangle(x, y, width, height)
            common/commontypes/geometry/Rectangle.js, line 8
        
        
    | Name | Type | Description | 
|---|---|---|
| x | float | 矩形左下角点的横坐标。 | 
| y | float | 矩形左下角点的纵坐标。 | 
| width | float | 矩形的宽度。 | 
| height | float | 矩形的高度。 | 
Example
//x 为矩形左下角点的横坐标;y 为矩形左下角点的纵坐标;w 为矩形的宽度;h 为矩形的高度
 var x = 1;
 var y = 2;
 var w = 10;
 var h = 20;
 var recttangle = new SuperMap.Geometry.Rectangle(x, y, w, h);Extends
Members
- 
    boundsSuperMap.Bounds
- 
    
    几何对象的范围。 
- 
    heightfloat
- 
    
    矩形的高度。 
- 
    idstring
- 
    
    此几何对象的唯一标示符。 
- 
    parentSuperMap.Geometry
- 
    
    This is set when a Geometry is added as component of another geometry 
- 
    SRIDinterger
- 
    
    投影坐标参数。通过该参数,服务器判断 Geometry 对象的坐标参考系是否与数据集相同,如果不同,则在数据入库前进行投影变换。 Examplevar geometry= new SuperMap.Geometry(); geometry. SRID=4326;
- 
    widthfloat
- 
    
    矩形的宽度。 
- 
    xfloat
- 
    
    矩形左下角点的横坐标。 
- 
    yfloat
- 
    
    矩形左下角点的纵坐标。 
Methods
- 
    calculateBounds()common/commontypes/geometry/Rectangle.js, line 59
- 
    
    
    计算出此矩形对象的 bounds。 
- 
    inherited clearBounds()common/commontypes/Geometry.js, line 85
- 
    
    
    清除几何对象的 bounds。 如果该对象有父类,也会清除父类几何对象的 bounds。 
- 
    inherited clone(){SuperMap.Geometry}common/commontypes/Geometry.js, line 63
- 
    
    
    创建克隆的几何图形。克隆的几何图形不设置非标准的属性。 Returns:Type Description SuperMap.Geometry 克隆的几何图形。 
- 
    inherited destroy()common/commontypes/Geometry.js, line 52
- 
    
    
    解构 Geometry 类,释放资源。 
- 
    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 范围。 
- 
    getArea(){float}common/commontypes/geometry/Rectangle.js, line 70
- 
    
    
    获取矩形对象的面积。 Returns:Type Description float 矩形对象面积。 
- 
    inherited getBounds(){SuperMap.Bounds}common/commontypes/Geometry.js, line 115
- 
    
    
    获得几何图形的边界。如果没有设置边界,可通过计算获得。 Returns:Type Description SuperMap.Bounds 返回的几何对象的边界。 
- 
    inherited getVertices(nodes){Array}common/commontypes/Geometry.js, line 138
- 
    
    
    返回几何图形的所有顶点的列表(需要在子类中实现此方法)。 Name Type Description nodesboolean 可选 如果是 true,线则只返回线的末端点,如果 false,仅仅返回顶点,如果没有设置,则返回顶点。 Returns:Type Description Array 几何图形的顶点列表。 
- 
    inherited setBounds(bounds)common/commontypes/Geometry.js, line 73
- 
    
    
    设置此几何对象的 bounds。 Name Type Description boundsSuperMap.Bounds 范围。