new GeoBoundary()
代表世界座標的一個範圍,內部包含west,south,east,north 4個屬性
Example
var a = new GeoBoundary();//預設建構子
var b = new GeoBoundary(a);//使用欲複製的GeoBoundary建立GeoBoundary
var c = new GeoBoundary(0, 0, 0, 0);//指定west,south,east,north並建立GeoBoundary
var d = new GeoBoundary([0, 0, 0, 0]);//使用陣列大小為4的數字建立GeoBoundary
var e = new GeoBoundary({west:0, south:0, east:0, north:0});//使用帶有west,south,east,north的Object建立GeoBoundary
    
    
Members
- 
    
readonlyCenter
 - 
    
    
中心點
Properties:
Name Type Description CenterGeoPoint 中心點
 - 
    
eastdouble
 - 
    
    
東邊
 - 
    
readonlyHeight
 - 
    
    
高度
Properties:
Name Type Description HeightNumber 高度
 - 
    
readonlyIsEmpty
 - 
    
    
是否為空的,空的是指Width === 0 || Height = 0
Properties:
Name Type Description IsEmptyBoolean 是否為空的
 - 
    
northdouble
 - 
    
    
北邊
 - 
    
southdouble
 - 
    
    
南邊
 - 
    
readonlytype
 - 
    
    
物件型態,值為GEO_TYPE.RECT
Properties:
Name Type Description typeGEO_TYPE 物件型態
 - 
    
westdouble
 - 
    
    
西邊
 - 
    
readonlyWidth
 - 
    
    
寬度
Properties:
Name Type Description WidthNumber 寬度
 
Methods
- 
    
staticGeoBoundary.IntersectRect(Rect1, Rect2){GeoBoundary|null}
common/Geometry.js, line 3578 - 
    
    
    
計算Rect1與Rect2的交集。
Name Type Description Rect1GeoBoundary 要計算的Rect。
Rect2GeoBoundary 要計算的Rect。
Returns:
Type Description GeoBoundary | null 傳回兩Rect的交集,若沒交集,傳回null。  - 
    
Clone(){GeoBoundary}
common/Geometry.js, line 3349 - 
    
    
    
產生一份新的自己。
Returns:
Type Description GeoBoundary 傳回複製的新的自己。  - 
    
ContractionToInteger()
common/Geometry.js, line 3748 - 
    
    
    
由於座標會有小數,本函式將往內縮,直至座標值為整數為止。
 - 
    
CopyFrom(Obj, south, east, north){GeoBoundary}
common/Geometry.js, line 3361 - 
    
    
    
複製。
Name Type Description ObjGeoBoundary | Number 為west,或本身就是一個GeoBoundary,或本身就是一個Array。
southNumber 若Obj參數為west使用,否則此參數無意義。
eastNumber 若Obj參數為west使用,否則此參數無意義。
northNumber 若Obj參數為west使用,否則此參數無意義。
Returns:
Type Description GeoBoundary 傳回this。  - 
    
Deflate(DeltaX, DeltaY)
common/Geometry.js, line 3685 - 
    
    
    
以中心點,向內縮。
Name Type Description DeltaXNumber west與east都往內縮DeltaX。
DeltaYNumber south與north都往內縮DeltaY。
 - 
    
Expand(p)
common/Geometry.js, line 3422 - 
    
    
    
使用一個點拓展Boundary。
Name Type Description pGeoPoint 輸入的點。
 - 
    
ExpandToInteger()
common/Geometry.js, line 3725 - 
    
    
    
由於座標會有小數,本函式將往外擴張,直至座標值為整數為止。
 - 
    
ExpandXY(x, y)
common/Geometry.js, line 3434 - 
    
    
    
使用一個點的xy值拓展Boundary。
Name Type Description xNumber 輸入的點的x。
yNumber 輸入的點的y。
 - 
    
FromGeoJSON(src){Boolean}
common/Geometry.js, line 3791 - 
    
    
    
讀入GeoJSON數值。
Name Type Description srcObject | String GeoJSON物件或字串 。
Returns:
Type Description Boolean 回傳讀取是否成功。  - 
    
Include(Rect){Boolean}
common/Geometry.js, line 3593 - 
    
    
    
是否完全包含Rect。
Name Type Description RectGeoBoundary 要被包含的Rect。
Returns:
Type Description Boolean 傳回是否完全包含Rect。  - 
    
Inflate(DeltaX, DeltaY)
common/Geometry.js, line 3697 - 
    
    
    
以中心點,向外擴張。
Name Type Description DeltaXNumber west與east都向外擴張DeltaX。
DeltaYNumber south與north都向外擴張DeltaY。
 - 
    
IntersectRect(Rect1, Rect2){Boolean}
common/Geometry.js, line 3477 - 
    
    
    
有兩種用法
檢查自己是否和Rect1相交,用GeoBoundary.IntersectRect(Rect1);
檢查Rect1與Rect2是否相交,若相交,把相交的範圍設定給自己,用GeoBoundary.IntersectRect(Rect1,Rect2);。Name Type Description Rect1GeoBoundary 檢查的Rect。
Rect2GeoBoundary | undefined 檢查的Rect。
Returns:
Type Description Boolean 傳回檢查的結果。  - 
    
IsEqual(Boundary){Boolean}
common/Geometry.js, line 3388 - 
    
    
    
是否相等。
Name Type Description BoundaryGeoBoundary 比較的Boundary。
Returns:
Type Description Boolean 傳回比較的結果。  - 
    
IsNotEqual(Boundary){Boolean}
common/Geometry.js, line 3397 - 
    
    
    
是否不相等。
Name Type Description BoundaryGeoBoundary 比較的Boundary。
Returns:
Type Description Boolean 傳回比較的結果。  - 
    
OffsetByXY(DeltaX, DeltaY)
common/Geometry.js, line 3709 - 
    
    
    
整個GeoBoundary位移(DeltaX,DeltaY)。
Name Type Description DeltaXNumber 水平位移。
DeltaYNumber 垂直位移。
 - 
    
PtInRect(p){Boolean}
common/Geometry.js, line 3455 - 
    
    
    
檢查p是否位於Rect範圍內
Name Type Description pGeoPoint 檢查的值。
Returns:
Type Description Boolean 傳回檢查的結果。  - 
    
PtXYInRect(p){Boolean}
common/Geometry.js, line 3446 - 
    
    
    
檢查p是否位於Rect範圍內
Name Type Description pGeoPoint 檢查的值。
Returns:
Type Description Boolean 傳回檢查的結果。  - 
    
Scale(scale)
common/Geometry.js, line 3671 - 
    
    
    
以中心點,對Width與Height縮放scale。
Name Type Description scaleNumber 縮放的倍數。
 - 
    
SetNegativeInfinity()
common/Geometry.js, line 3411 - 
    
    
    
將Boundary設為負無窮大(不合理的值)。
 - 
    
SetNULL()
common/Geometry.js, line 3404 - 
    
    
    
將west,south,east,north都設為0。
 - 
    
ToArray(){Array.<Number>}
common/Geometry.js, line 3341 - 
    
    
    
回傳陣列[W,S,E,N]。
Returns:
Type Description Array.<Number> 陣列[W,S,E,N]。  - 
    
ToGeoJSON(toString){Object|String}
common/Geometry.js, line 3773 - 
    
    
    
將幾何輸出成GeoJSON物件或字串。
Name Type Description toStringBoolean 是否把物件轉成JSON字串。
Returns:
Type Description Object | String 輸出轉換結果。  - 
    
ToPolygon(){GeoPolygon}
common/Geometry.js, line 3810 - 
    
    
    
轉換成多邊形(西北、東北、東南、西南)
Returns:
Type Description GeoPolygon 多邊形  - 
    
Union(Rect)
common/Geometry.js, line 3633 - 
    
    
    
計算聯集。
Name Type Description RectGeoBoundary 聯集的對象。