Class

Position

Position(lng, lat, alt, heading, pitch, roll)

Constructor

# new Position(lng, lat, alt, heading, pitch, roll)

自定义坐标类

Parameters:
Name Type Description
lng Number

经度

lat Number

纬度

alt Number

高度

heading Number

航向角

pitch Number

俯仰角

roll Number

翻滚角

Author:
  • xyj

Members

# alt

Number

# readonly alt

高度

# heading

Number

# readonly heading

航向

# lat

Number

# readonly lat

纬度

# lng

Number

# readonly lng

经度

# pitch

Number

# readonly pitch

俯仰

# roll

Number

# readonly roll

翻滚角

Methods

# clone() → {Position}

克隆对象

  • 克隆后的对象
Position

# copy() → {Position}

-复制后的对象

Position

# serialize() → {string}

序列化Position对象

string

# toArray() → {Array}

转换为数组方式

  • 经纬度数组
Array

# toObject() → {Object}

转换为对象

  • 对象
Object

# toString() → {string}

转换为字符串方式

  • 字符串
string

# static deserialize(valStr) → {Position}

反序列化

Parameters:
Name Type Description
valStr string

序列化字符串

  • Position对象
Position

# static fromArray(arr) → {Position}

从数组转为坐标

Parameters:
Name Type Description
arr Array

数组坐标

Position对象

Position

# static fromObject(jsonStr) → {Position}

从OBJ转坐标

Parameters:
Name Type Description
jsonStr Object

JSON字符串

-Position对象

Position

# static fromString(str) → {Position}

从字符串转坐标

Parameters:
Name Type Description
str string

坐标字符串

Position对象

Position