OpenLayers.Geometry.Polygonクラス

下記のクラスから継承


ポリゴンはGeometry.LinearRingsのコレクションです。

コンストラクター


OpenLayers.Geometry.Polygon

ポリゴンジオメトリを作成します。 最初のリング(this.component[0])は多角形の外の境界です、そして、すべての以降のリング(this.component[1-n])は内部ホールです。
パラメータ

メソッド


getArea

getArea: function()


内部の穴の領域を外の穴の領域から引くことによって計算されます。
戻り値
{float} ジオメトリの面積。
intersects

intersects: function( geometry )


幾何学交差するかどうか判断します。
パラメータ

戻り値
{Boolean} 入力ジオメトリと交差するかどうか。

createRegularPolygon

OpenLayers.Geometry.Polygon.createRegularPolygon = function( origin, radius, sides, rotation )


正多角形を作成します。
パラメータ
  • origin {OpenLayers.Geometry.Point} ポリゴンの中心。
  • radius {Float} 頂点からの距離、マップ単位です。
  • sides {Integer} サイドの数です。20は近似する円です。
  • rotation {Float} 最初の回転角度(度単位)
Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License