PilotGaea 2D O'view
    正在準備搜尋索引...

    類別 GeoBoundary

    代表世界座標的一個範圍,內部包含 west, south, east, north 4個屬性

    層級 (查看層級一覽)

    實作

    索引

    屬性

    west: number = 0

    西邊

    0
    
    south: number = 0

    南邊

    0
    
    east: number = 0

    東邊

    0
    
    north: number = 0

    北邊

    0
    

    方法

    • 回傳 GeoJSON.BBox 陣列。

      回傳 BBox

      陣列。

    • 產生一份新的自己。

      回傳 GeoBoundary

      傳回複製的新的自己。

    • GeoJSON.BBox 陣列複製屬性。

      參數

      • array: BBox

        陣列。

      回傳 GeoBoundary

      this

    • GeoBoundary 複製屬性。

      參數

      回傳 GeoBoundary

      this

    • 複製屬性。

      參數

      • west: number

        西邊。

      • south: number

        南邊。

      • east: number

        東邊。

      • north: number

        北邊。

      回傳 GeoBoundary

      this

    • 範圍是否相等。

      參數

      回傳 boolean

      傳回比較的結果。

    • 範圍是否不相等。

      參數

      回傳 boolean

      傳回比較的結果。

    • west, south, east, north 都設為0。

      回傳 void

    • 將範圍設為負無窮大(不合理的值)。

      回傳 void

      let bound = new GeoBoundary();
      bound.SetNegativeInfinity();
      console.log(bound.west); // Infinity
      console.log(bound.south); // Infinity
      console.log(bound.east); // -Infinity
      console.log(bound.north); // -Infinity
    • 使用一個點拓展範圍。

      參數

      回傳 void

    • 使用 x, y 值拓展範圍。

      參數

      • x: number

        輸入的點的x。

      • y: number

        輸入的點的y。

      回傳 void

    • 檢查 x, y 值是否位於範圍內

      參數

      • x: number

        x值。

      • y: number

        y值。

      回傳 boolean

      是否位於範圍內。

    • 檢查點是否位於範圍內

      參數

      回傳 boolean

      是否位於範圍內。

    • 檢查自己是否和指定範圍相交

      參數

      回傳 boolean

      是否和指定範圍相交。

    • 檢查 rect1, rect2 是否相交

      若相交,把相交的範圍設定給自己。

      參數

      回傳 boolean

      rect1, rect2 是否相交。

    • 此範圍是否完全包含指定範圍。

      參數

      回傳 boolean

      傳回是否完全包含指定範圍。

    • 與指定範圍做聯集。

      參數

      回傳 void

    • Center 為中心點,對 WidthHeight 縮放指定倍數。

      參數

      • scale: number

        縮放的倍數。

      回傳 void

    • 向內縮,west, north 減少, east, south 增加為向內。

      參數

      回傳 void

    • 向外擴張,west, north 增加, east, south 減少為向外。

      參數

      回傳 void

    • 位移範圍。

      參數

      • deltaX: number | PointLike

        水平位移。

      • 可選deltaY: number

        垂直位移。

      回傳 void

    • Center 為中心點,向外擴張直至 westeastsouthnorth 為整數。

      回傳 void

    • Center 為中心點,向內縮直至 westeastsouthnorth 為整數。

      回傳 void

    • 將幾何輸出成GeoJSON物件。

      參數

      • 可選toString: false

        是否把物件轉成JSON字串。

      回傳 Boundary

      輸出轉換結果。

    • 將幾何輸出成GeoJSON字串。

      參數

      • toString: true

        是否把物件轉成JSON字串。

      回傳 string

      輸出轉換結果。

    • 將幾何輸出成GeoJSON物件。

      參數

      • 可選toString: boolean

        是否把物件轉成JSON字串。

      回傳 string | Boundary

      輸出轉換結果。

    • 讀入 GeoJSON 數值。

      參數

      回傳 boolean

      回傳讀取是否成功。

    • 轉換成多邊形 (西北、東北、東南、西南)

      回傳 GeoPolygon

      多邊形

    構造函數

    • 建立範圍

      回傳 GeoBoundary

      let bound = new GeoBoundary(); // 預設建構子
      
    • 建立範圍

      參數

      • obj: [west: number, south: number, east: number, north: number]

        大小為 4 的數字陣列,數字依序代表西邊,南邊,東邊,北邊

      回傳 GeoBoundary

      let bound = new GeoBoundary([0, 0, 0, 0]); // 使用大小為 4 的數字陣列建立 GeoBoundary
      
    • 建立範圍

      參數

      回傳 GeoBoundary

      let boundCopy = new GeoBoundary(a); // 使用欲複製的 GeoBoundary 建立 GeoBoundary
      let boundObj = new GeoBoundary({west:0, south:0, east:0, north:0});// 使用帶有 west, south, east, north 的物件建立 GeoBoundary
    • 建立範圍

      參數

      • west: number

        指定的西邊。

      • south: number

        指定的南邊。

      • east: number

        指定的東邊。

      • north: number

        指定的北邊。

      回傳 GeoBoundary

      let bound = new GeoBoundary(0, 0, 0, 0); // 指定 west, south, east, north 並建立 GeoBoundary
      

    訪問器屬性

    • get type(): 6

      物件型態,值為 GEO_TYPE.RECT

      回傳 6

    • get Width(): number

      寬度

      回傳 number

    • get Height(): number

      高度

      回傳 number

    • get Center(): GeoPoint

      中心點

      回傳 GeoPoint

    • get IsEmpty(): boolean

      是否為空;Width 為 0 或是 Height 為 0。

      回傳 boolean