Skip to content

m-gis核心库 v0.4.4


m-gis核心库 / Plot

类: Plot ​

定义于: geomatics/plot/core/Plot.ts:71

构造函数 ​

构造函数 ​

new Plot(viewer, options?): Plot

定义于: geomatics/plot/core/Plot.ts:91

参数 ​

viewer ​

Viewer

容器

options? ​

OPTIONS = ...

标绘构造属性

返回 ​

Plot

属性 ​

_viewer ​

_viewer: Viewer

定义于: geomatics/plot/core/Plot.ts:72


config ​

config: object

定义于: geomatics/plot/core/Plot.ts:75

autoActive ​

autoActive: boolean

editable ​

editable: boolean

pointLabel? ​

optional pointLabel?: POINT_LABEL

stretchable ​

stretchable: boolean


id ​

id: string

定义于: geomatics/plot/core/Plot.ts:73


plotHelper ​

plotHelper: PlotHelper

定义于: geomatics/plot/core/Plot.ts:74


geometryTypes ​

static geometryTypes: object[]

定义于: geomatics/plot/core/Plot.ts:189

geometries ​

geometries: object[]

label ​

label: string = '点类'

type ​

type: string = 'Point'


plotMap ​

static plotMap: Map<any, any>

定义于: geomatics/plot/core/Plot.ts:190

访问器 ​

activeInfo ​

Getter 签名 ​

get activeInfo(): any

定义于: geomatics/plot/core/Plot.ts:343

获取当前激活图形的data

返回 ​

any


activeInstance ​

Getter 签名 ​

get activeInstance(): any

定义于: geomatics/plot/core/Plot.ts:333

获取当前激活的 instance

返回 ​

any


activeInstanceType ​

Getter 签名 ​

get activeInstanceType(): any

定义于: geomatics/plot/core/Plot.ts:352

获取当前激活图形的标绘类型

返回 ​

any


allInstances ​

Getter 签名 ​

get allInstances(): any[]

定义于: geomatics/plot/core/Plot.ts:324

获取当前所有标绘实例

返回 ​

any[]


autoActive ​

Getter 签名 ​

get autoActive(): boolean

定义于: geomatics/plot/core/Plot.ts:124

返回 ​

boolean

Setter 签名 ​

set autoActive(val): void

定义于: geomatics/plot/core/Plot.ts:128

参数 ​
val ​

boolean

返回 ​

void


baseHeight ​

Getter 签名 ​

get baseHeight(): number

定义于: geomatics/plot/core/Plot.ts:150

返回 ​

number

Setter 签名 ​

set baseHeight(val): void

定义于: geomatics/plot/core/Plot.ts:154

参数 ​
val ​

number

返回 ​

void


editable ​

Getter 签名 ​

get editable(): boolean

定义于: geomatics/plot/core/Plot.ts:114

返回 ​

boolean

Setter 签名 ​

set editable(val): void

定义于: geomatics/plot/core/Plot.ts:118

参数 ​
val ​

boolean

返回 ​

void


extrudedHeight ​

Getter 签名 ​

get extrudedHeight(): number

定义于: geomatics/plot/core/Plot.ts:140

返回 ​

number

Setter 签名 ​

set extrudedHeight(val): void

定义于: geomatics/plot/core/Plot.ts:144

参数 ​
val ​

number

返回 ​

void


stretchable ​

Getter 签名 ​

get stretchable(): boolean

定义于: geomatics/plot/core/Plot.ts:132

返回 ​

boolean

Setter 签名 ​

set stretchable(val): void

定义于: geomatics/plot/core/Plot.ts:136

参数 ​
val ​

boolean

返回 ​

void

方法 ​

activate() ​

activate(instance?): void

定义于: geomatics/plot/core/Plot.ts:254

激活编辑态

参数 ​

instance? ​

any

返回 ​

void


add() ​

add(plotInstance): void

定义于: geomatics/plot/core/Plot.ts:486

添加 plot 实例

参数 ​

plotInstance ​

any

实体对象

返回 ​

void


clear() ​

clear(): void

定义于: geomatics/plot/core/Plot.ts:362

清空所有标绘实例

返回 ​

void


deactivate() ​

deactivate(instance?): void

定义于: geomatics/plot/core/Plot.ts:264

取消激活

参数 ​

instance? ​

any

返回 ​

void


destroy() ​

destroy(): void

定义于: geomatics/plot/core/Plot.ts:370

销毁所有标绘实例

返回 ​

void


draw() ​

draw(type, options?): Plot

定义于: geomatics/plot/core/Plot.ts:452

绘制图形

参数 ​

type ​

any

标绘图形类型

// 标绘类型 {String} type "Billboard" // 自定义图标 "Rectangle2D" // 贴地矩形 "Polygon2D" // 贴地面 "Polygon2DArrowP" // 平尾平面箭头 "Polygon2DArrowS" // 燕尾平面箭头 "Polygon2DArrowDouble" // 平面钳击箭头 "Circle2D" // 贴地圆 "POINT" // 点 "PolygonSector2D" // 贴地扇形 "PolygonCurve2D" // 贴地曲面(自由面) "Polyline" // 折线标绘 "Curve" // 曲线 "PolylineArrow" // 箭头线 "CurveArrow" // 箭头曲线 "Arrow" // 箭头 "ArrowDouble" // 钳击(双箭头) "ArrowStraight" // 粗单尖直箭头 "Beizer" // 贝塞尔曲线 "Bspline" // B样条曲线 "PolygonCurve2D" // 贴地曲面(自由面) "POLYGON3D" // 面立体

options? ​

any = {}

标绘图形属性

// 图标属性设置 const options = { billboard: { image: require('../../assets/dataImages/cars.png'), width: 20, height: 20, } }

// 通用要素按需选取属性 const options = { show:true,//是否显示 fill: true,//是否用提供的材料填充多边形 material: Cesium.Color.YELLOW.withAlpha(0.5),//材质 outline: true,//是否显示边框 outlineColor: Cesium.Color.YELLOW.withAlpha(0.7),//边框颜色 outlineWidth: 10,//边框宽度 color:Color.WHITE, //颜色 clampToGround: true,//贴地 extrudedHeight: 20, //拉升高度 ........ }

返回 ​

Plot

标绘构造实例


exportAllData() ​

exportAllData(): object

定义于: geomatics/plot/core/Plot.ts:275

获取图上所有标绘实例const datas = plot.exportAllData()

返回 ​

object

entities ​

entities: any[]

type ​

type: string = 'plot'


off() ​

off(type, callback): Plot

定义于: geomatics/plot/core/Plot.ts:476

解除事件绑定

参数 ​

type ​

any

事件类型

callback ​

any

回调方法

返回 ​

Plot

标绘构造实例


on() ​

on(type, callback): Plot

定义于: geomatics/plot/core/Plot.ts:464

绑定事件

参数 ​

type ​

any

事件类型

callback ​

any

回调方法

返回 ​

Plot

标绘构造实例


read() ​

read(options?): void

定义于: geomatics/plot/core/Plot.ts:224

通过 json 读取一个标绘实例

参数 ​

options? ​

READ_OPT | READ_OPT[]

标绘 json

返回 ​

void


remove() ​

remove(plotInstance): Plot

定义于: geomatics/plot/core/Plot.ts:510

移除 plot 实例

参数 ​

plotInstance ​

any

实体对象

返回 ​

Plot

标绘构造实例


removeById() ​

removeById(instanceId): Plot

定义于: geomatics/plot/core/Plot.ts:521

根据实例id删除实例

参数 ​

instanceId ​

string

返回 ​

Plot

标绘构造实例


set() ​

set(id, options): Plot

定义于: geomatics/plot/core/Plot.ts:384

为指定 id 的标绘设置属性

参数 ​

id ​

string

id

options ​

any

样式属性参数

返回 ​

Plot

当前 plot 实例


setAttrs() ​

setAttrs(style): void

定义于: geomatics/plot/core/Plot.ts:500

设置当前激活状态图形的样式

参数 ​

style ​

any

图形样式参数

返回 ​

void


clear() ​

static clear(plotId): void

定义于: geomatics/plot/core/Plot.ts:196

清除指定 plot 构造实例,不传 id 则清除所有 plot 构造实例

参数 ​

plotId ​

string

返回 ​

void


getInstance() ​

static getInstance(...args): any

定义于: geomatics/plot/core/Plot.ts:293

获取 plot 实例

参数 ​

args ​

...any[]

返回 ​

any

标绘构造实例

MGis 地理三维库