mxcad API 文档 / MxMap
Class: MxMap
Table of contents
Constructors
Properties
Methods
- cadLongToMercatorCoord
- cadToMercatorCoord
- cadTolnglat
- create
- getMapbox
- getMxDrawObject
- initMapbox
- lnglatToCAD
- lnglat_to_mercator
- map_lnglat_to_meters
- map_meters_to_lnglat
- mercatorCoord2CAD
- mercatorCoordToCAD
- mercator_to_lnglat
- outOfChina
- setCoordinatePointAlignment
- setLoadOldEditionMethod
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
Name | Type |
---|---|
len | number |
Returns
number
cadToMercatorCoord
▸ cadToMercatorCoord(pt
): Vector3
Parameters
Name | Type |
---|---|
pt | Vector3 |
Returns
Vector3
cadTolnglat
▸ cadTolnglat(pt
): number
[]
Parameters
Name | Type |
---|---|
pt | Vector3 |
Returns
number
[]
create
▸ create(map
, config
): Promise
<void
>
Parameters
Name | Type |
---|---|
map | any |
config | any |
Returns
Promise
<void
>
getMapbox
▸ getMapbox(): any
Returns
any
getMxDrawObject
▸ getMxDrawObject(): MxDrawObject
Returns
MxDrawObject
initMapbox
▸ initMapbox(map
): void
Parameters
Name | Type |
---|---|
map | any |
Returns
void
lnglatToCAD
▸ lnglatToCAD(lng
, lat
): Vector3
Parameters
Name | Type |
---|---|
lng | number |
lat | number |
Returns
Vector3
lnglat_to_mercator
▸ lnglat_to_mercator(lng
, lat
): Vector3
Parameters
Name | Type |
---|---|
lng | number |
lat | number |
Returns
Vector3
map_lnglat_to_meters
▸ map_lnglat_to_meters(lng
, lat
): number
[]
Parameters
Name | Type |
---|---|
lng | number |
lat | number |
Returns
number
[]
map_meters_to_lnglat
▸ map_meters_to_lnglat(x
, y
): number
[]
Parameters
Name | Type |
---|---|
x | number |
y | number |
Returns
number
[]
mercatorCoord2CAD
▸ mercatorCoord2CAD(x
, y
): Vector3
Parameters
Name | Type |
---|---|
x | number |
y | number |
Returns
Vector3
mercatorCoordToCAD
▸ mercatorCoordToCAD(x
, y
): Vector3
Parameters
Name | Type |
---|---|
x | number |
y | number |
Returns
Vector3
mercator_to_lnglat
▸ mercator_to_lnglat(x
, y
, z
): number
[]
Parameters
Name | Type |
---|---|
x | number |
y | number |
z | number |
Returns
number
[]
outOfChina
▸ outOfChina(lng
, lat
): boolean
Parameters
Name | Type |
---|---|
lng | number |
lat | number |
Returns
boolean
setCoordinatePointAlignment
▸ setCoordinatePointAlignment(originLngLatLike
, originCAD
, meterInCADUnits
): void
Parameters
Name | Type |
---|---|
originLngLatLike | number [] |
originCAD | number [] |
meterInCADUnits | number |
Returns
void
setLoadOldEditionMethod
▸ setLoadOldEditionMethod(): void
Returns
void