new GeoPoint(obj, y, z)
建立點
| Name | Type | Description | 
|---|---|---|
| obj | GeoPoint | Number | Object | optional 欲複製的GeoPoint;指定的x;帶有x,y(,z)的Object。 | 
| y | number | optional 指定的y。 | 
| z | number | optional 指定的z。 | 
Example
var a = new GeoPoint();//預設建構子
var b = new GeoPoint(a);//使用欲複製的GeoPoint建立GeoPoint
var c = new GeoPoint(0, 0);//指定x,y建立GeoPoint
var d = new GeoPoint(0, 0, 0);//指定x,y,z建立GeoPoint
var e = new GeoPoint({x:0, y:0});//使用帶有x,y的Object建立GeoPoint
var f = new GeoPoint({x:0, y:0, z:0});//使用帶有x,y,z的Object建立GeoPoint
Extends
Members
- 
    Boundary
- 
    
    此幾何的範圍,因為是點,所以範圍的Width與Height都是0 Properties:Name Type Description BoundaryGeoBoundary 範圍 
- 
    Length
- 
    
    此點離原點的長度 Properties:Name Type Description Lengthnumber 長度 
- 
    PolarAngle
- 
    
    波拉角,即把此座標當向量,此向量的數學角度,單位為角度 Properties:Name Type Description PolarAnglenumber 波拉角 
- 
    readonlytype
- 
    
    物件型態,值為GEO_TYPE.POINT Properties:Name Type Description typeGEO_TYPE 物件型態 
- 
    xnumber
- 
    
    x座標 
- 
    ynumber
- 
    
    y座標 
- 
    znumber
- 
    
    z座標 
Methods
- 
    Classify(line){GEO_STATUS}common/geometry/GeoPoint.js, line 221
- 
    
    
    計算自己相關於Line的位置。 Name Type Description lineGeoLine 要相對的Line。 Returns:Type Description GEO_STATUS 傳回自己相關於Line的位置。 
- 
    Clone(){GeoPoint}common/geometry/GeoPoint.js, line 100
- 
    
    
    產生一份新的自己。 Returns:Type Description GeoPoint 傳回複製的新的自己。 
- 
    CopyFrom(obj, y, z){GeoPoint}common/geometry/GeoPoint.js, line 110
- 
    
    
    複製。 Name Type Description objPointLike | number 複製的GeoPoint或x。 ynumber optional 若Obj參數為x時此參數為y,否則此參數無意義。 znumber optional 若Obj參數為x時此參數為z,否則此參數無意義。 Returns:Type Description GeoPoint this。 
- 
    Distance(obj){number}common/geometry/GeoPoint.js, line 246
- 
    
    
    計算自己與傳入幾何的距離。 Name Type Description objPointLike | GeoPolyline | GeoPolygon | GeoPolygonSet 要計算距離的幾何資料。 Returns:Type Description number 傳回距離。 
- 
    Div(div){GeoPoint}common/geometry/GeoPoint.js, line 203
- 
    
    
    將座標除以div,並傳回結果。 Name Type Description divnumber 要除的值。 Returns:Type Description GeoPoint 傳回計算的結果。 
- 
    DivSelf(div){GeoPoint}common/geometry/GeoPoint.js, line 211
- 
    
    
    將自己的座標除以div。 Name Type Description divnumber 要除的值。 Returns:Type Description GeoPoint this。 
- 
    FromGeoJSON(src){boolean}common/geometry/GeoPoint.js, line 351
- 
    
    
    讀入GeoJSON數值。 Name Type Description srcGeoJSON.GeoJsonObject | string GeoJSON物件或字串。 Returns:Type Description boolean 回傳讀取是否成功。 
- 
    IsEqual(p){boolean}common/geometry/GeoPoint.js, line 133
- 
    
    
    是否相等。 Name Type Description pGeoPoint 比較的point。 Returns:Type Description boolean 傳回比較的結果。 
- 
    IsNotEqual(p){boolean}common/geometry/GeoPoint.js, line 141
- 
    
    
    是否不相等。 Name Type Description pGeoPoint 比較的point。 Returns:Type Description boolean 傳回比較的結果。 
- 
    MakeBuffer(delta, polygonSet){boolean}common/geometry/GeoPoint.js, line 277
- 
    
    
    做出環域的PolygonSet。 Name Type Description deltanumber 環域的距離。 polygonSetGeoPolygonSet out參數,環域計算的答案。 Returns:Type Description boolean 回傳是否成功。 
- 
    Mul(scale){GeoPoint}common/geometry/GeoPoint.js, line 185
- 
    
    
    將座標乘上Scale,並傳回結果。 Name Type Description scalenumber 要乘的值。 Returns:Type Description GeoPoint 傳回計算的結果。 
- 
    MulSelf(scale){GeoPoint}common/geometry/GeoPoint.js, line 193
- 
    
    
    將自己的座標乘上Scale。 Name Type Description scalenumber 要乘的值。 Returns:Type Description GeoPoint this。 
- 
    Normalize(){GeoPoint}common/geometry/GeoPoint.js, line 284
- 
    
    
    把point當向量,做向量的正規化,就是把向量的長度變成1。 Returns:Type Description GeoPoint this。 
- 
    Offset(p)common/geometry/GeoPoint.js, line 267
- 
    
    
    位移,與PlusSelf一樣。 Name Type Description pGeoPoint 要位移的距離。 
- 
    Plus(p){GeoPoint}common/geometry/GeoPoint.js, line 149
- 
    
    
    將座標加上point,並傳回結果。 Name Type Description pGeoPoint 要計算的point。 Returns:Type Description GeoPoint 傳回計算的結果。 
- 
    PlusSelf(p){GeoPoint}common/geometry/GeoPoint.js, line 157
- 
    
    
    將座標加到自己的座標上。 Name Type Description pGeoPoint 要計算的point。 Returns:Type Description GeoPoint this。 
- 
    Rotate(angle, wrtPoint){GeoPoint}common/geometry/GeoPoint.js, line 299
- 
    
    
    旋轉。 Name Type Default Description anglenumber 旋轉的角度。 wrtPointGeoPoint | undefined null 旋轉的中心點,若wrtPoint=undefined,代表繞著原點旋轉。 Returns:Type Description GeoPoint this。 
- 
    Sub(p){GeoPoint}common/geometry/GeoPoint.js, line 167
- 
    
    
    將座標減去point,並傳回結果。 Name Type Description pGeoPoint 要計算的point。 Returns:Type Description GeoPoint 傳回計算的結果。 
- 
    SubSelf(p){GeoPoint}common/geometry/GeoPoint.js, line 175
- 
    
    
    將自己座標減去point。 Name Type Description pGeoPoint 要計算的point。 Returns:Type Description GeoPoint this。 
- 
    ToGeoJSON(toString, includeZ){GeoJSON.Point|string}common/geometry/GeoPoint.js, line 329
- 
    
    
    將幾何輸出成GeoJSON物件或字串。 Name Type Description toStringboolean 是否把物件轉成JSON字串。 includeZboolean 是否包含Z,標準GeoJSON不包含Z(可不給,預設false)。 Returns:Type Description GeoJSON.Point | string 輸出轉換結果。 
- 
    toString(){string}common/geometry/GeoPoint.js, line 320
- 
    
    
    將座標值轉成字串,格式為(x,y)。 Returns:Type Description string 用字串代表此座標。