Skip to content

KBE3D / KBCore / utils / LatLngPoint

类: LatLngPoint

表示经纬度点的工具类

属性

FormatLength

static FormatLength: number = 6

经纬度的格式化小数位长度


FormatAltLength

static FormatAltLength: number = 2

高度的格式化小数位长度

方法

setLng()

setLng(value: number): void

参数

value

number

返回

void


setLat()

setLat(value: number): void

参数

value

number

返回

void


setAlt()

setAlt(value: number): void

参数

value

number

返回

void


clone()

clone(): LatLngPoint

返回

LatLngPoint


format()

format(): this

返回

this


toArray()

toArray(includeAlt?: boolean): [number, number] | [number, number, number]

参数

includeAlt?

boolean = false

返回

[number, number] | [number, number, number]


toString()

toString(): string

返回

string


toCartesian()

toCartesian(): Cartesian3

返回

Cartesian3


toCartographic()

toCartographic(): Cartographic

返回

Cartographic


equals()

equals(other: LatLngPoint): boolean

参数

other

LatLngPoint

返回

boolean


valid()

valid(): boolean

返回

boolean

构造函数

构造函数

new LatLngPoint(lng?: number, lat?: number, alt?: number): LatLngPoint

参数

lng?

number

lat?

number

alt?

number

返回

LatLngPoint

访问器

lng

Getter 签名

get lng(): number

返回

number

Setter 签名

set lng(value: number): void

参数
value

number

返回

void


lat

Getter 签名

get lat(): number

返回

number

Setter 签名

set lat(value: number): void

参数
value

number

返回

void


alt

Getter 签名

get alt(): number

返回

number

Setter 签名

set alt(value: number): void

参数
value

number

返回

void

静态方法

parse()

static parse(input: ParserLatLngPointInput, time?: JulianDate): LatLngPoint

将ParserLatLngPointInput定义的数据类型的position转换为LatLngPoint标准对象

参数

input

ParserLatLngPointInput

time?

JulianDate

返回

LatLngPoint

返回一个LatLngPoint对象


fromArray()

static fromArray(array: number[]): LatLngPoint

将Array数据类型的position转换为LatLngPoint标准对象

参数

array

number[]

返回

LatLngPoint

返回一个LatLngPoint对象


fromString()

static fromString(input: string): LatLngPoint

将string数据类型的position转换为LatLngPoint标准对象

参数

input

string

返回

LatLngPoint

返回一个LatLngPoint对象


fromCartesian()

static fromCartesian(cartesian: Cartesian3 | { _value?: Cartesian3; getValue?: (...args: any[]) => Cartesian3; } | SampledPositionProperty & { _value?: Cartesian3; }, time?: JulianDate): LatLngPoint

将Cartesian3数据类型的position转换为LatLngPoint标准对象

参数

cartesian

Cartesian3 | { _value?: Cartesian3; getValue?: (...args: any[]) => Cartesian3; } | SampledPositionProperty & { _value?: Cartesian3; }

time?

JulianDate

返回

LatLngPoint

返回一个LatLngPoint对象


fromCartographic()

static fromCartographic(cartographic: Cartographic): LatLngPoint

将Cartographic数据类型的position转换为LatLngPoint标准对象

参数

cartographic

Cartographic

返回

LatLngPoint

返回一个LatLngPoint对象


toCartesian()

static toCartesian(input: ParserLatLngPointInput, time?: JulianDate): Cartesian3

将LatLngPoint标准对象转换为Cesium.Cartesian3笛卡尔坐标

参数

input

ParserLatLngPointInput

time?

JulianDate

返回

Cartesian3

返回Cesium.Cartesian3笛卡尔坐标


toCartographic()

static toCartographic(input: ParserLatLngPointInput, time?: JulianDate): Cartographic

将LatLngPoint标准对象转换为Cesium内部标准的Cartographic坐标类

参数

input

ParserLatLngPointInput

time?

JulianDate

返回

Cartographic

返回Cesium.Cartographic对象

KBE3D @3.0.0 Copyright © 2024-present KBE3D