mxcad_2d API 文档 / 2d / MxCADPluginMapDefaultData
Class: MxCADPluginMapDefaultData
2d.MxCADPluginMapDefaultData
初始化、管理或查询地图相关联的默认数据
Example
ts
//设置地图加载的缺省数据
import { MxCADPluginMapDefaultData } from "mxcad";
let map_default_data = new MxCADPluginMapDefaultData();
// CAD图纸与地图的对齐点.
map_default_data.cadOrigin = [116275.977014, 19273.279085];
// 12698436.047373507,2575109.229937706,12698641.731873507,2575240.5864377064
// 地图与CAD图纸的对齐位置 。
map_default_data.mapOrigin = [114.06825863001939, 22.54283198132819];
// CAD图上一个绘图单是地图上多少米.
map_default_data.meterInCADUnits = 1.0;
// 需要打开的cad图纸.
map_default_data.openFile = './demo/road.dwg.mxweb'
Table of contents
Constructors
Properties
- cadOrigin
- mapOrigin
- mapbox_accessToken
- meterInCADUnits
- openFile
- providers
- rasterTileKey
- rasterTileLayerList
- viewColor
Constructors
constructor
• new MxCADPluginMapDefaultData()
Properties
cadOrigin
• cadOrigin: number
[] = []
CAD图纸与地图的对齐点
mapOrigin
• mapOrigin: number
[] = []
地图与CAD图纸的对齐位置
mapbox_accessToken
• mapbox_accessToken: string
= ""
mapbox地图token
meterInCADUnits
• meterInCADUnits: number
= 1.0
openFile
• Optional
openFile: string
需要打开的cad图纸
providers
• Optional
providers: any
rasterTileKey
• Optional
rasterTileKey: string
矢量瓦片关键词
rasterTileLayerList
• rasterTileLayerList: any
[] = []
栅格瓦片图层列表
viewColor
• Optional
viewColor: Object
背景颜色
Type declaration
Name | Type |
---|---|
blue | number |
green | number |
red | number |