readme.md 804 B

疑点标记插件使用说明

1:插件引用

<script src="scripts/vendor/leaflet/leaflet.draw.js"></script>
<link rel="stylesheet" type="text/css" href="scripts/vendor/leaflet/leaflet.draw.css" />

2:方法声明

//进入综合分析引入

map2DViewer.drawToolFire = function(data) {
   console.log(data)
};
map2DViewer.setDrawTool({
    action: 'add',
    offset: [150, 50],
    background: "#fff",
    color: "red",
    font_size: "14px",
    closeButton: true,
    iconUrl:"http://localhost:888/scripts/vendor/leaflet/images/marker-icon.png"//点标记图标地址
});

3:开启绘制功能

map2DViewer.setDrawTool({action:"start"})

4:插件移除方法

map2DViewer.setDrawTool({
    action: 'remove',
})