界面
坐标
new Coord()
实例化
返回:
- 实例化Coord对象
详情:
实例化
Coord
对象,可以调用坐标模块中的方法示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
console.log(coord)
ecefToGeographic()
地心地固坐标系(地心坐标系)转换为地理坐标
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 地心地固坐标系(地心坐标系)转换为地理坐标后的返回信息
详情:
地心地固坐标系(地心坐标系)转换为地理坐标
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.ecefToGeographic(x, y, z)
console.log(res)
ecefToEngine()
地心地固坐标系(地心坐标系)转换为引擎坐标
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 地心地固坐标系(地心坐标系)转换为引擎坐标后的返回信息
详情:
地心地固坐标系(地心坐标系)转换为引擎坐标
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.ecefToEngine(x, y, z)
console.log(res)
ecefToProjection()
地心地固坐标系(地心坐标系)转换为投影
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 地心地固坐标系(地心坐标系)转换为投影后的返回信息
详情:
地心地固坐标系(地心坐标系)转换为投影
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.ecefToProjection(x, y, z)
console.log(res)
geographicToECEF()
地理转地心地固
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 地理转地心地固后的返回信息
详情:
地理转地心地固
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.geographicToECEF(x, y, z)
console.log(res)
geographicToEngine()
地理转引擎
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 地理转引擎后的返回信息
详情:
地理转引擎
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.geographicToEngine(x, y, z)
console.log(res)
geographicToProjection()
地理转投影
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 地理转投影后的返回信息
详情:
地理转投影
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 120, y = 36, z = 100.000
const res = await coord.geographicToProjection(x, y, z)
console.log(res)
engineToGeographic()
引擎转地理
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 引擎转地理后的返回信息
详情:
引擎转地理
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.engineToGeographic(x, y, z)
console.log(res)
engineToECEF()
引擎转地心地固
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 引擎转地心地固后的返回信息
详情:
引擎转地心地固
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.engineToECEF(x, y, z)
console.log(res)
engineToProjection()
引擎转投影
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 引擎转投影后的返回信息
详情:
引擎转投影
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.engineToProjection(x, y, z)
console.log(res)
projectionToECEF()
投影坐标转地心地固坐标系(地心坐标系)
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 投影坐标转地心地固坐标系(地心坐标系)后的返回信息
详情:
投影坐标转地心地固坐标系(地心坐标系)
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.projectionToECEF(x, y, z)
console.log(res)
projectionToGeographic()
投影转地理
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 投影转地理后的返回信息
详情:
投影转地理
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.projectionToGeographic(x, y, z)
console.log(res)
projectionToEngine()
投影转引擎
参数:
{Number} x x坐标
{Number} y y坐标
{Number} z z坐标
返回:
- 投影转引擎后的返回信息
详情:
投影转引擎
示例:
js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )
const coord = new kapi.Coord()
let x = 510853.156, y = 4057258.500, z = 0.000
const res = await coord.projectionToEngine(x, y, z)
console.log(res)