new GeoPolygonSet(Obj)
            common/Geometry.js, line 7320
        
        
    幾何物件:複合多邊形,內部包含外圍(Bounds)與洞(Holes)兩組Polygon
| Name | Type | Description | 
|---|---|---|
Obj | 
            
            
            GeoBoundary | GeoPolygon | GeoPolygonSet | undefined | 
                
                 複製的資料源。  | 
        
Example
var a = new GeoPolygonSet(polygon);
var b = new GeoPolygonSet();
    
    
Members
- 
    
readonlyBoundary
 - 
    
    
此幾何的範圍
Properties:
Name Type Description BoundaryGeoBoundary 範圍
 - 
    
Bounds
 - 
    
    
放置外圍Polygon的Buffer
Properties:
Name Type Description BoundsArray.<GeoPolygon> 點位陣列
 - 
    
readonlyCenter
 - 
    
    
此幾何的中心點
Properties:
Name Type Description CenterGeoPoint 中心點
 - 
    
HolesArray.<GeoPolygon>
 - 
    
    
放置洞Polygon的Buffer
 - 
    
PointCount
 - 
    
    
內含點位的數量
Properties:
Name Type Description PointCountNumber 點位的數量
 - 
    
readonlytype
 - 
    
    
物件型態,值為GEO_TYPE.POLYGONSET
Properties:
Name Type Description typeGEO_TYPE 物件型態
 
Methods
- 
    
Clone(){GeoPolyline}
common/Geometry.js, line 7432 - 
    
    
    
產生一份新的自己。
Returns:
Type Description GeoPolyline 傳回複製的新的自己。  - 
    
CombinPolygonSet(PolygonSet, RetPolygonSet, CombinType){Boolean}
common/Geometry.js, line 7471 - 
    
    
    
將自己與傳入的PolygonSet做合併運算。
Name Type Description PolygonSetGeoPolygonSet 運算的PolygonSet資料。
RetPolygonSetGeoPolygonSet 此為out參數,需先在外面配好變數,合併後的結果。
CombinTypeGEO_CB_TYPE 運算類型。
Returns:
Type Description Boolean 傳回運算是否成功  - 
    
CopyFrom(Obj){GeoPolygonSet}
common/Geometry.js, line 7441 - 
    
    
    
複製。
Name Type Description ObjGeoPolygon | GeoPolygonSet 複製的資料源。
Returns:
Type Description GeoPolygonSet this。  - 
    
Distance(Obj){Number}
common/Geometry.js, line 7795 - 
    
    
    
計算自己與傳入幾何的距離。
Name Type Description ObjGeoPoint | GeoLine | GeoPolyline | GeoPolygon | GeoPolygonSet 要計算距離的幾何資料。
Returns:
Type Description Number 傳回距離。  - 
    
FromGeoJSON(src){Boolean}
common/Geometry.js, line 7965 - 
    
    
    
讀入GeoJSON數值。
Name Type Description srcObject | String GeoJSON物件或字串 。
Returns:
Type Description Boolean 回傳讀取是否成功。  - 
    
GetArea(){Number}
common/Geometry.js, line 7495 - 
    
    
    
計算此Polygon的面積。
Returns:
Type Description Number 傳回計算的面積。  - 
    
Include(Obj, bound){Boolean}
common/Geometry.js, line 7683 - 
    
    
    
判斷傳入的幾何資料是否被自己包含。
Name Type Description ObjGeoPoint | GeoLine | GeoPolyline | GeoPolygon | GeoPolygonSet 判斷的幾何資料。
boundBoolean 只用於Polygon與PolygonSet,指示相交於編上是否算包含。
Returns:
Type Description Boolean 傳回是否相交。  - 
    
IsIntersect(obj, slice){Boolean}
common/Geometry.js, line 7568 - 
    
    
    
判斷自己與傳入幾何是否相交。
Name Type Description objGeoPolyline | GeoPolygon | GeoPolygonSet 判斷的幾何資料。
sliceBoolean 指定若只交在節點上,算不算相交。
Returns:
Type Description Boolean 傳回是否相交。  - 
    
MakeBuffer(Distance, PolygonSet){Boolean}
common/Geometry.js, line 7865 - 
    
    
    
做出環域的PolygonSet。
Name Type Description DistanceNumber 環域的距離。
PolygonSetGeoPolygonSet out參數,環域計算的答案。
Returns:
Type Description Boolean 回傳是否成功。  - 
    
Offset(p)
common/Geometry.js, line 7845 - 
    
    
    
位移p。
Name Type Description pGeoPoint 欲位移的距離。
 - 
    
PtInPolygonSet(p, Obj){Boolean}
common/Geometry.js, line 7819 - 
    
    
    
檢查傳入的點p是否位於此PolygonSet內。
Name Type Description pGeoPoint 欲檢查的點。
ObjObject 此為out參數,需在執行前先配置好,執行後,Obj.InBound=true|false代表是否位於邊緣上。
Returns:
Type Description Boolean 傳回是否位於Polygon內。  - 
    
RemoveAll()
common/Geometry.js, line 7459 - 
    
    
    
移除所偶的點位資料。
 - 
    
ToGeoBuffer(){Array}
common/Geometry.js, line 8045 - 
    
    
    
輸出成緩衝區物件。
Returns:
Type Description Array 回傳多邊形集合緩衝區陣列。  - 
    
ToGeoJSON(toString, includeZ){Object|String}
common/Geometry.js, line 7897 - 
    
    
    
將幾何輸出成GeoJSON物件或字串。
Name Type Description toStringBoolean 是否把物件轉成JSON字串。
includeZBoolean 是否包含Z,標準GeoJSON不包含Z(可不給,預設false)。
Returns:
Type Description Object | String 輸出轉換結果。