Skip to content
On this page

mxcad API 文档 / MxMap

Class: MxMap

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new MxMap()

Properties

imp

Private imp: any = {}


loadOldEditionMethod

Private loadOldEditionMethod: boolean = false


map

Private map: any


meterInCADUnits

Private meterInCADUnits: number = 1.0


modelAltitude

Private modelAltitude: number = 0


mxcad

mxcad: McObject


originCAD

Private originCAD: number[]


originLngLatLike

Private originLngLatLike: number[]

Methods

cadLongToMercatorCoord

cadLongToMercatorCoord(len): number

Parameters

NameType
lennumber

Returns

number


cadToMercatorCoord

cadToMercatorCoord(pt): Vector3

Parameters

NameType
ptVector3

Returns

Vector3


cadTolnglat

cadTolnglat(pt): number[]

Parameters

NameType
ptVector3

Returns

number[]


create

create(map, config): Promise<void>

Parameters

NameType
mapany
configany

Returns

Promise<void>


getMapbox

getMapbox(): any

Returns

any


getMxDrawObject

getMxDrawObject(): MxDrawObject

Returns

MxDrawObject


initMapbox

initMapbox(map): void

Parameters

NameType
mapany

Returns

void


lnglatToCAD

lnglatToCAD(lng, lat): Vector3

Parameters

NameType
lngnumber
latnumber

Returns

Vector3


lnglat_to_mercator

lnglat_to_mercator(lng, lat): Vector3

Parameters

NameType
lngnumber
latnumber

Returns

Vector3


map_lnglat_to_meters

map_lnglat_to_meters(lng, lat): number[]

Parameters

NameType
lngnumber
latnumber

Returns

number[]


map_meters_to_lnglat

map_meters_to_lnglat(x, y): number[]

Parameters

NameType
xnumber
ynumber

Returns

number[]


mercatorCoord2CAD

mercatorCoord2CAD(x, y): Vector3

Parameters

NameType
xnumber
ynumber

Returns

Vector3


mercatorCoordToCAD

mercatorCoordToCAD(x, y): Vector3

Parameters

NameType
xnumber
ynumber

Returns

Vector3


mercator_to_lnglat

mercator_to_lnglat(x, y, z): number[]

Parameters

NameType
xnumber
ynumber
znumber

Returns

number[]


outOfChina

outOfChina(lng, lat): boolean

Parameters

NameType
lngnumber
latnumber

Returns

boolean


setCoordinatePointAlignment

setCoordinatePointAlignment(originLngLatLike, originCAD, meterInCADUnits): void

Parameters

NameType
originLngLatLikenumber[]
originCADnumber[]
meterInCADUnitsnumber

Returns

void


setLoadOldEditionMethod

setLoadOldEditionMethod(): void

Returns

void