OpenLayers.Geometry.Polygonクラス
ポリゴンはGeometry.LinearRingsのコレクションです。
Table of Contents
|
コンストラクター
OpenLayers.Geometry.Polygon
ポリゴンジオメトリを作成します。 最初のリング(this.component[0])は多角形の外の境界です、そして、すべての以降のリング(this.component[1-n])は内部ホールです。
パラメータ
- components {Array(OpenLayers.Geometry.LinearRing)}
メソッド
getArea
getArea: function()
内部の穴の領域を外の穴の領域から引くことによって計算されます。
戻り値
{float} ジオメトリの面積。
intersects
intersects: function( geometry )
幾何学交差するかどうか判断します。
パラメータ
- geometry {OpenLayers.Geometry} 任意種類のジオメトリ。
戻り値
{Boolean} 入力ジオメトリと交差するかどうか。
createRegularPolygon
OpenLayers.Geometry.Polygon.createRegularPolygon = function( origin, radius, sides, rotation )
正多角形を作成します。
パラメータ
- origin {OpenLayers.Geometry.Point} ポリゴンの中心。
- radius {Float} 頂点からの距離、マップ単位です。
- sides {Integer} サイドの数です。20は近似する円です。
- rotation {Float} 最初の回転角度(度単位)
page revision: 3, last edited: 10 May 2008 06:29