new fengmap.FMMapEditor(map)
| Name | Type | Description |
|---|---|---|
map |
Object |
FMMap对象 |
Members
-
centerUrl
-
Properties:
Name Type Description centerUrlString 编辑面的中点图片路径
-
DrawTool
-
Properties:
Name Type Description DrawToolString 编辑面的中点图片路径,point:绘制点,line:绘制线,circle:圆,ellipse:椭圆,rect:矩形,polygon:多边形,none:不绘制
-
editUrl
-
Properties:
Name Type Description editUrlString 编辑线和面的图片路径
-
LineStyle
-
Properties:
Name Type Description LineStyleObject Properties
Name Type Description colorstring 线颜色
widthnumber 线宽,默认6
smoothboolean 是否平滑,默认true
radiusnumber 圆弧半径,默认 1
urlstring 贴图路径, 优先使用,如果没有给值,则使用lineType的线型
typeFMLineType 线型, 默认值 fengmap.FMLineType.ARROW
borderColorstring 设置FMARROW线型线边线的颜色,十六进制颜色值。如:'#FF0000'
animateboolean true 启动动画 false 不启动动画 默认 false
depthboolean true 开启深度 false 不开启深度 默认 true
-
PointStyle
-
Properties:
Name Type Description PointStyleObject Properties
Name Type Description urlstring 图片地址,必填项
heightnumber 离地高度, 默认 1
sizeint 图片显示尺寸,默认32
anchorFMMarkerAnchor 锚点位置
depthbool 文本渲染深度,true:开启深度,false:关闭深度,默认为false
collisionbool 避让,true:开启避让,false:关闭避让,默认为true
-
PolygonStyle
-
Properties:
Name Type Description PolygonStyleObject Properties
Name Type Description heightnumber 离地高度, 默认 1
opacitynumber 多边形的透明度。0.0 - 1.0 之间取值, 默认为 1.0
colorString 多边形的颜色
borderWidthnumber 多边形边框线宽,默认为2
borderColorstring 多边形边框线颜色,默认 #FF0000
Methods
-
dispose()
-
废置点线面绘制对象
-
edit(object)
-
编辑点线面方法
Name Type Description objectObject 要编辑的点线面对象
-
on(type, callback)
-
点线面事件注册
Name Type Description typestring 事件类型
callbackfunction 回调函数
Events
-
drawend
-
绘制完成事件
Example
{ type:'drawend', // 事件类型 info:{}, // 绘制完成的对象配置信息 object:{}, // 绘制的对象 } -
drawing
-
绘制中事件
Example
{ type:'drawing', // 事件类型 info:{}, // 绘制中的对象配置信息 object:{}, // 绘制的对象 } -
editend
-
编辑完成事件
Example
{ type:'editend', // 事件类型 info:{}, // 编辑完成的对象配置信息 object:{}, // 编辑完成的对象 }