@mapgis/webclient-common
Version:
mapgis ES6 format for igserver
7,970 lines • 127 kB
HTML
<header id="page-title" class="page-title">
<span class="page-title-main">类名</span>
<span class="page-title-sub">SketchEditorCesium</span>
</header>
<section>
<article>
<div class="container-overview">
<div class='vertical-section'>
<div class="members">
<div class="member">
<h4 class="name" id="SketchEditorCesium">
<a class="href-link" href="#SketchEditorCesium">#</a>
<span class="code-name" id="SketchEditorCesium" style="font-size:30px">
new SketchEditorCesium<span class="signature">(options)</span>
</span>
</h4>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="description last"><p>构造参数</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>elevationInfo</code></td>
<td class="type">
<span class="param-type">
<a link="MapView.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MapView" MapView.html>MapView</a>
</span>
|
<span class="param-type">
<a link="SceneView.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SceneView" SceneView.html>SceneView</a>
</span>
</td>
<td class="description last"><p>草图图形高程模式参数</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
</div>
</div>
</div>
</div>
<h3 class="subsection-title">继承关系</h3>
<ul>
<li><a link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor" SketchEditor.html>SketchEditor</a></li>
</ul>
<div class='vertical-section'>
<h3 id='member'>成员变量</h3>
<h4 style="margin-top: 20px;margin-bottom: 20px;">成员变量概述</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code><a href="#editable">editable</a></code></td>
<td class="name">
<code>
<span class="param-type">
Boolean
</span>
</code>
</td>
<td class="name"><code><p>草图是否可编辑。默认值为true,可编辑</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#isSimple">isSimple</a></code></td>
<td class="name">
<code>
<span class="param-type">
Boolean
</span>
</code>
</td>
<td class="name"><code><p>草图是否进行拓扑检查。默认值为false,不进行拓扑检查</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#layer">layer</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="GraphicsLayer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="GraphicsLayer" GraphicsLayer.html>GraphicsLayer</a>
</span>
</code>
</td>
<td class="name"><code><p>草图图形图层</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#measureOption">measureOption</a></code></td>
<td class="name">
<code>
<span class="param-type">
Number
</span>
</code>
</td>
<td class="name"><code><p>草图量算配置项</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#sketchDataType">sketchDataType</a></code></td>
<td class="name">
<code>
<span class="param-type">
Number
</span>
</code>
</td>
<td class="name"><code><p>草图绘制类型</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#sketchStyle">sketchStyle</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="SketchStyle.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchStyle" SketchStyle.html>SketchStyle</a>
</span>
</code>
</td>
<td class="name"><code><p>草图样式</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#snapAndReferGeometries">snapAndReferGeometries</a></code></td>
<td class="name">
<code>
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Geometry.html">Geometry</a>>
</span>
</code>
</td>
<td class="name"><code><p>捕获和线造区边界参考几何图形集合</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#snapOption">snapOption</a></code></td>
<td class="name">
<code>
<span class="param-type">
Object
</span>
</code>
</td>
<td class="name"><code><p>草图捕获配置项</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#view">view</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="MapView.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MapView" MapView.html>MapView</a>
</span>
|
<span class="param-type">
<a link="SceneView.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SceneView" SceneView.html>SceneView</a>
</span>
</code>
</td>
<td class="name"><code><p>地图视图</p></code></td>
</tr>
</tbody>
</table>
</div>
<h4 style="margin-top: 20px;margin-bottom: 20px;">成员变量详情</h4>
<div class="members">
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Boolean
</span>
</span>
<h4 class="name" id="editable">
<a class="href-link" href="#editable">#</a>
<span class="code-name">
editable
</span>
</h4>
<div class="description">
<p>草图是否可编辑。默认值为true,可编辑</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="editable" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#editable" SketchEditor.html#editable>SketchEditor#editable</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Boolean
</span>
</span>
<h4 class="name" id="isSimple">
<a class="href-link" href="#isSimple">#</a>
<span class="code-name">
isSimple
</span>
</h4>
<div class="description">
<p>草图是否进行拓扑检查。默认值为false,不进行拓扑检查</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="isSimple" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#isSimple" SketchEditor.html#isSimple>SketchEditor#isSimple</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="GraphicsLayer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="GraphicsLayer" GraphicsLayer.html>GraphicsLayer</a>
</span>
</span>
<h4 class="name" id="layer">
<a class="href-link" href="#layer">#</a>
<span class="code-name">
layer
</span>
</h4>
<div class="description">
<p>草图图形图层</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="layer" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#layer" SketchEditor.html#layer>SketchEditor#layer</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Number
</span>
</span>
<h4 class="name" id="measureOption">
<a class="href-link" href="#measureOption">#</a>
<span class="code-name">
measureOption
</span>
</h4>
<div class="description">
<p>草图量算配置项</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="measureOption" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#measureOption" SketchEditor.html#measureOption>SketchEditor#measureOption</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Number
</span>
</span>
<h4 class="name" id="sketchDataType">
<a class="href-link" href="#sketchDataType">#</a>
<span class="code-name">
sketchDataType
</span>
</h4>
<div class="description">
<p>草图绘制类型</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="sketchDataType" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#sketchDataType" SketchEditor.html#sketchDataType>SketchEditor#sketchDataType</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="SketchStyle.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchStyle" SketchStyle.html>SketchStyle</a>
</span>
</span>
<h4 class="name" id="sketchStyle">
<a class="href-link" href="#sketchStyle">#</a>
<span class="code-name">
sketchStyle
</span>
</h4>
<div class="description">
<p>草图样式</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="sketchStyle" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#sketchStyle" SketchEditor.html#sketchStyle>SketchEditor#sketchStyle</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Geometry.html">Geometry</a>>
</span>
</span>
<h4 class="name" id="snapAndReferGeometries">
<a class="href-link" href="#snapAndReferGeometries">#</a>
<span class="code-name">
snapAndReferGeometries
</span>
</h4>
<div class="description">
<p>捕获和线造区边界参考几何图形集合</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="snapAndReferGeometries" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#snapAndReferGeometries" SketchEditor.html#snapAndReferGeometries>SketchEditor#snapAndReferGeometries</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Object
</span>
</span>
<h4 class="name" id="snapOption">
<a class="href-link" href="#snapOption">#</a>
<span class="code-name">
snapOption
</span>
<span class='tag'>Optional</span>
</h4>
<div class="description">
<p>草图捕获配置项</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="snapOption" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#snapOption" SketchEditor.html#snapOption>SketchEditor#snapOption</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="MapView.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MapView" MapView.html>MapView</a>
</span>
|
<span class="param-type">
<a link="SceneView.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SceneView" SceneView.html>SceneView</a>
</span>
</span>
<h4 class="name" id="view">
<a class="href-link" href="#view">#</a>
<span class="code-name">
view
</span>
</h4>
<div class="description">
<p>地图视图</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="view" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#view" SketchEditor.html#view>SketchEditor#view</a>
</li></ul></dd>
</dl>
</div>
</div>
</div>
<div class='vertical-section'>
<h3 id='function'>方法</h3>
<h4 style="margin-top: 20px;margin-bottom: 20px;">方法概述</h4>
<div class="members">
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>返回值类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code><a href="#addVertex">addVertex</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</code>
</td>
<td class="name"><code><p>向当前线或区草图中插入新的顶点</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#canRedo">canRedo</a></code></td>
<td class="name">
<code>
<span class="param-type">
Boolean
</span>
</code>
</td>
<td class="name"><code><p>草图是否可执行恢复操作</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#canUndo">canUndo</a></code></td>
<td class="name">
<code>
<span class="param-type">
Boolean
</span>
</code>
</td>
<td class="name"><code><p>草图是否可执行撤销操作</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#destroy">destroy</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>销毁草图编辑器</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#drawPolylineToPolygon">drawPolylineToPolygon</a></code></td>
<td class="name">
<code>
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Polygon.html">Polygon</a>>
</span>
</code>
</td>
<td class="name"><code><p>线拓扑造区</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#getGeometry">getGeometry</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</code>
</td>
<td class="name"><code><p>获取草图几何对象</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#getSketchDataType">getSketchDataType</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="SketchDataType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchDataType" global.html#SketchDataType>SketchDataType</a>
</span>
</code>
</td>
<td class="name"><code><p>获取草图图形类型</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#getSketchStyle">getSketchStyle</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="SketchStyle.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchStyle" SketchStyle.html>SketchStyle</a>
</span>
</code>
</td>
<td class="name"><code><p>获取草图样式</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#getSnapAndReferGeometries">getSnapAndReferGeometries</a></code></td>
<td class="name">
<code>
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Geometry.html">Geometry</a>>
</span>
</code>
</td>
<td class="name"><code><p>获取捕获和线造区边界参考几何图形集合</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#getSnapOption">getSnapOption</a></code></td>
<td class="name">
<code>
<span class="param-type">
Object
</span>
</code>
</td>
<td class="name"><code><p>获取捕捉配置项</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#off">off</a></code></td>
<td class="name">
<code>
<span class="param-type">
Object
</span>
</code>
</td>
<td class="name"><code><p>移除事件<br/>
示例如下:<br/>
</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#on">on</a></code></td>
<td class="name">
<code>
<span class="param-type">
Object
</span>
</code>
</td>
<td class="name"><code><p>注册一个新的监听事件;<br/>
示例如下:<br/>
</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#redo">redo</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</code>
</td>
<td class="name"><code><p>恢复被撤销的草图</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#remove">remove</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>移除当前草图</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#removeVertex">removeVertex</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</code>
</td>
<td class="name"><code><p>移除当前选中的线或区草图图形的某个顶点</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#setSketchStyle">setSketchStyle</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>设置草图样式</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#setSnapAndReferGeometries">setSnapAndReferGeometries</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>设置捕获和线造区边界参考几何图形集合</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#setSnapOption">setSnapOption</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>设置捕捉配置项</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#split">split</a></code></td>
<td class="name">
<code>
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Polygon.html">Polygon</a>>
</span>
</code>
</td>
<td class="name"><code><p>分割草图对象或区几何对象</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#start">start</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>开始(鼠标)绘制草图</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#startCustomDrawTool">startCustomDrawTool</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>开始(鼠标)绘制自定义草图图形</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#stop">stop</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>停止鼠标绘制草图</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#undo">undo</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</code>
</td>
<td class="name"><code><p>撤销当前编辑操作</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#union">union</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="Polygon.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Polygon" Polygon.html>Polygon</a>
</span>
</code>
</td>
<td class="name"><code><p>合并多个区几何</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#updateVertex">updateVertex</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</code>
</td>
<td class="name"><code><p>更新当前选中线或区草图图形的某个顶点</code></td>
</tr>
</tbody>
</table>
</div>
<h4 style="margin-top: 20px;margin-bottom: 20px;">方法详情</h4>
<div class="member">
<h4 class="name" id="addVertex">
<a class="href-link" href="#addVertex">#</a>
<span class="code-name" id="addVertex" style="font-size:30px">
addVertex<span class="signature">(point, index)</span>
</span>
</h4>
<div class="description">
<p>向当前线或区草图中插入新的顶点<a id='addVertex'></a></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>point</code></td>
<td class="type">
<span class="param-type">
<a link="Point.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Point" Point.html>Point</a>
</span>
</td>
<td class="description last"><p>新增/插入顶点</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="description last"><p>新增/新增点的序号</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="addVertex" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#addVertex" SketchEditor.html#addVertex>SketchEditor#addVertex</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>改变后的图形几何</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="canRedo">
<a class="href-link" href="#canRedo">#</a>
<span class="code-name" id="canRedo" style="font-size:30px">
canRedo<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>草图是否可执行恢复操作<a id='canRedo'></a></p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="canRedo" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#canRedo" SketchEditor.html#canRedo>SketchEditor#canRedo</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
Boolean
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="canUndo">
<a class="href-link" href="#canUndo">#</a>
<span class="code-name" id="canUndo" style="font-size:30px">
canUndo<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>草图是否可执行撤销操作<a id='canUndo'></a></p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="canUndo" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#canUndo" SketchEditor.html#canUndo>SketchEditor#canUndo</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
Boolean
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="destroy">
<a class="href-link" href="#destroy">#</a>
<span class="code-name" id="destroy" style="font-size:30px">
destroy<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>销毁草图编辑器</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="destroy" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#destroy" SketchEditor.html#destroy>SketchEditor#destroy</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<h4 class="name" id="drawPolylineToPolygon">
<a class="href-link" href="#drawPolylineToPolygon">#</a>
<span class="code-name" id="drawPolylineToPolygon" style="font-size:30px">
drawPolylineToPolygon<span class="signature">(snapAndReferGeometries)</span>
</span>
</h4>
<div class="description">
<p>线拓扑造区<a id='drawPolylineToPolygon'></a></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>snapAndReferGeometries</code></td>
<td class="type">
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Polygon.html">Polygon</a>>
</span>
</td>
<td class="description last"><p>捕获参考几何对象数组</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="drawPolylineToPolygon" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#drawPolylineToPolygon" SketchEditor.html#drawPolylineToPolygon>SketchEditor#drawPolylineToPolygon</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>分割后的几何对象</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Polygon.html">Polygon</a>>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="getGeometry">
<a class="href-link" href="#getGeometry">#</a>
<span class="code-name" id="getGeometry" style="font-size:30px">
getGeometry<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>获取草图几何对象<a id='getGeometry'></a></p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="getGeometry" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#getGeometry" SketchEditor.html#getGeometry>SketchEditor#getGeometry</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="getSketchDataType">
<a class="href-link" href="#getSketchDataType">#</a>
<span class="code-name" id="getSketchDataType" style="font-size:30px">
getSketchDataType<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>获取草图图形类型<a id='getSketchDataType'></a></p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="getSketchDataType" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#getSketchDataType" SketchEditor.html#getSketchDataType>SketchEditor#getSketchDataType</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
<a link="SketchDataType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchDataType" global.html#SketchDataType>SketchDataType</a>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="getSketchStyle">
<a class="href-link" href="#getSketchStyle">#</a>
<span class="code-name" id="getSketchStyle" style="font-size:30px">
getSketchStyle<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>获取草图样式<a id='getSketchStyle'></a></p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="getSketchStyle" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#getSketchStyle" SketchEditor.html#getSketchStyle>SketchEditor#getSketchStyle</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
<a link="SketchStyle.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchStyle" SketchStyle.html>SketchStyle</a>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="getSnapAndReferGeometries">
<a class="href-link" href="#getSnapAndReferGeometries">#</a>
<span class="code-name" id="getSnapAndReferGeometries" style="font-size:30px">
getSnapAndReferGeometries<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>获取捕获和线造区边界参考几何图形集合</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="getSnapAndReferGeometries" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#getSnapAndReferGeometries" SketchEditor.html#getSnapAndReferGeometries>SketchEditor#getSnapAndReferGeometries</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>捕捉配置项</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Geometry.html">Geometry</a>>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="getSnapOption">
<a class="href-link" href="#getSnapOption">#</a>
<span class="code-name" id="getSnapOption" style="font-size:30px">
getSnapOption<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>获取捕捉配置项</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="getSnapOption" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#getSnapOption" SketchEditor.html#getSnapOption>SketchEditor#getSnapOption</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>捕捉配置项</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
Object
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="off">
<a class="href-link" href="#off">#</a>
<span class="code-name" id="off" style="font-size:30px">
off<span class="signature">(types<span class="signature-attributes">opt</span>, fn<span class="signature-attributes">opt</span>, context<span class="signature-attributes">opt</span>)</span>
</span>
</h4>
<div class="description">
<p>移除事件<br/>
示例如下:<br/>
<a href='#off1'>[1、移除一个事件的指定回调函数]</a><br/>
<a href='#off2'>[2、移除一个事件的所有回调函数]</a><br/>
<a href='#off3'>[3、移除多个事件的同一个指定的回调函数]</a><br/>
<a href='#off4'>[4、移除多个指定事件的回调函数]</a><br/>
<a href='#off5'>[5、删除时指定上下文 - types类型为字符串]</a><br/>
<a href='#off6'>[6、删除时指定上下文 - types类型为对象]</a><br/></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>types</code></td>
<td class="type">
<span class="param-type">
string
</span>
</td>
<td class="description last"><p>移除指定事件类型上绑定的回调函数<br/>
当类型为字符串时,可以移除单个或多个事件类型绑定的回调函数,单个事件:"click",多个事件:以空格分割:"click double-click";<br/>
当types为对象时,使用如下方式移除事件:{'click': onClickFun, 'mouse-move': onMouseMoveFun}</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>fn</code></td>
<td class="type">
<span class="param-type">
function
</span>
</td>
<td class="description last"><p>事件回调函数,当types为字符串,且不指定要删除的回调函数时,删除该事件上的所有回调函数</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>context</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="description last"><p>事件回调函数的this关键字将指向的对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="off" link="Evented.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Evented#off" Evented.html#off>Evented#off</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>当前实例</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
Object
</span>
</div>
</div>
</div>
</div>
<h5>示例</h5>
<p class="code-caption"><h5 id='off1'>移除一个事件的指定回调函数</h5></p>
<pre class="prettyprint"><code>// 一个事件的回调函数
const clickFunction = function (event) {
console.log("点击事件:", event)
}
// 调用MapView或SceneView的off方法移除一个事件的回调函数
view.off('click', clickFunction)</code></pre>
<p class="code-caption"><h5 id='off2'>移除一个事件的所有回调函数</h5></p>
<pre class="prettyprint"><code>// 一个事件的回调函数1
const clickFunction1 = function (event) {
console.log("点击事件1:", event)
}
// 一个事件的回调函数2
const clickFunction2 = function (event) {
console.log("点击事件2:", event)
}
// 调用MapView或SceneView的off方法移除一个事件的所有回调函数
// 不指定回调函数,则移除该事件上的所有绑定的回调函数
view.off('click')</code></pre>
<p class="code-caption"><h5 id='off3'>移除多个事件的同一个指定的回调函数</h5></p>
<pre class="prettyprint"><code>// 多个事件的同一个回调函数
const eventFunction = function (event) {
console.log("事件:", event)
}
// 调用MapView或SceneView的off方法移除多个事件的同一个指定的回调函数
view.off('click double-click', eventFunction)</code></pre>
<p class="code-caption"><h5 id='off4'>移除多个指定事件的回调函数</h5></p>
<pre class="prettyprint"><code>// 一个事件的回调函数
const clickFunction = function (event) {
console.log("click事件:", event)
}
// 调用MapView或SceneView的off方法移除多个指定事件的回调函数
view.off({
// 移除click事件上一个指定的函数
"click": clickFunction,
// 移除double-click上所有指定的函数
"double-click": undefined
})</code></pre>
<p class="code-caption"><h5 id='off5'>删除时指定上下文 - types类型为字符串</h5></p>
<pre class="prettyprint"><code>// 一个事件的回调函数
const clickFunction = function (event) {
console.log("点击事件:", event)
}
// 调用MapView或SceneView的off方法移除一个事件的回调函数
view.off('click', clickFunction, view)
// 调用MapView或SceneView的off方法移除一个事件的所有回调函数
view.off('click', undefined, view)</code></pre>
<p class="code-caption"><h5 id='off6'>删除时指定上下文 - types类型为对象</h5></p>
<pre class="prettyprint"><code>// 一个事件的回调函数
const clickFunction = function (event) {
console.log("click事件:", event)
}
// 调用MapView或SceneView的off方法移除多个指定事件的回调函数
view.off({
// 移除click事件上一个指定的函数
"click": clickFunction,
// 移除double-click上所有指定的函数
"double-click": undefined
}, view)</code></pre>
</div>
<div class="member">
<h4 class="name" id="on">
<a class="href-link" href="#on">#</a>
<span class="code-name" id="on" style="font-size:30px">
on<span class="signature">(types<span class="signature-attributes">opt</span>, fn<span class="signature-attributes">opt</span>, context<span class="signature-attributes">opt</span>)</span>
</span>
</h4>
<div class="description">
<p>注册一个新的监听事件;<br/>
示例如下:<br/>
<a href='#event1'>[1、注册一个事件]</a><br/>
<a href='#event2'>[2、一次注册多个事件 - 同一个回调函数]</a><br/>
<a href='#event3'>[3、一次注册多个事件 - 分别指回调应函数]</a><br/>
<a href='#event4'>[4、当types为字符串时 - 指定上下文]</a><br/>
<a href='#event5'>[5、当types为对象时 - 指定上下文]</a><br/></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th style="min-width: 100px;">默认值</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>types</code></td>
<td class="type">
<span class="param-type">
String
</span>
|
<span class="param-type">
Object
</span>
</td>
<td class="default">
null
</td>
<td class="description last"><p>事件类型<br/>
当types为字符串时,可以定义单个或多个事件,单个事件:"click",多个事件:以空格分割:"click double-click";<br/>
当types为对象时,使用如下方式指定事件:{'click': onClickFun, 'mouse-move': onMouseMoveFun}</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>fn</code></td>
<td class="type">
<span class="param-type">
function
</span>
</td>
<td class="default">
null
</td>
<td class="description last"><p>事件回调函数</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>context</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="default">
null
</td>
<td class="description last"><p>事件回调函数的this关键字将指向的对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="on" link="Evented.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Evented#on" Evented.html#on>Evented#on</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>当前实例</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
Object
</span>
</div>
</div>
</div>
</div>
<h5>示例</h5>
<p class="code-caption"><h5 id='event1'>注册一个事件</h5></p>
<pre class="prettyprint"><code>// 初始化一个点击事件回调函数
const clickFunction = function (event) {
console.log("点击事件:", event)
}
// 调用MapView或SceneView的on方法注册一个点击事件
view.on('click', clickFunction)</code></pre>
<p class="code-caption"><h5 id='event2'>一次注册多个事件 - 同一个回调函数</h5></p>
<pre class="prettyprint"><code>// 初始化一个事件回调函数
const eventFunction = function (event) {
console.log("事件:", event)
}
// 调用MapView或SceneView的on方法注册多个事件
// 多个事件类型使用同一个回调函数
view.on('click right-click-down', eventFunction)</code></pre>
<p class="code-caption"><h5 id='event3'>一次注册多个事件 - 分别指回调应函数</h5></p>
<pre class="prettyprint"><code>// 初始化一个左键点击事件回调函数
const clickFunction = function (event) {
console.log("click事件:", event)
}
// 初始化一个右键按下事件回调函数
const rightClickFunction = function (event) {
console.log("right-click-down事件:", event)
}
// 调用MapView或SceneView的on方法注册多个事件
// 每一个事件类型,使用单独的回调函数
// 注意使用此种方式,一种类型的事件仅能指定一个回调函数
view.on({
"click": clickFunction,
"right-click-down": rightClickFunction
})</code></pre>
<p class="code-caption"><h5 id='event4'>指定上下文 - types类型为字符串</h5></p>
<pre class="prettyprint"><code>// 初始化一个点击事件回调函数
const clickFunction = function (event) {
console.log("点击事件:", event)
console.log("上下文对象:", this)
}
// 调用MapView或SceneView的on方法注册一个点击事件
// 指定view为回调函数的上下文对象
view.on('click', clickFunction, view)</code></pre>
<p class="code-caption"><h5 id='event5'>指定上下文 - types类型为对象</h5></p>
<pre class="prettyprint"><code>// 初始化一个点击事件回调函数
const clickFunction = function (event) {
console.log("点击事件:", event)
console.log("上下文对象:", this)
}
// 调用MapView或SceneView的on方法注册一个点击事件
// 指定view为回调函数的上下文对象
view.on({
"click": clickFunction,
"right-click-down": clickFunction
}, view)</code></pre>
</div>
<div class="member">
<h4 class="name" id="redo">
<a class="href-link" href="#redo">#</a>
<span class="code-name" id="redo" style="font-size:30px">
redo<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>恢复被撤销的草图<a id='redo'></a></p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="redo" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#redo" SketchEditor.html#redo>SketchEditor#redo</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>恢复后的几何对象</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="remove">
<a class="href-link" href="#remove">#</a>
<span class="code-name" id="remove" style="font-size:30px">
remove<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>移除当前草图<a id='remove'></a></p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="remove" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#remove" SketchEditor.html#remove>SketchEditor#remove</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<h4 class="name" id="removeVertex">
<a class="href-link" href="#removeVertex">#</a>
<span class="code-name" id="removeVertex" style="font-size:30px">
removeVertex<span class="signature">(index)</span>
</span>
</h4>
<div class="description">
<p>移除当前选中的线或区草图图形的某个顶点<a id='removeVertex'></a></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="description last"><p>需更新的顶点的序号</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="removeVertex" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#removeVertex" SketchEditor.html#removeVertex>SketchEditor#removeVertex</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>改变后的图形几何</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="setSketchStyle">
<a class="href-link" href="#setSketchStyle">#</a>
<span class="code-name" id="setSketchStyle" style="font-size:30px">
setSketchStyle<span class="signature">(sketchStyle)</span>
</span>
</h4>
<div class="description">
<p>设置草图样式<a id='setSketchStyle'></a></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>sketchStyle</code></td>
<td class="type">
<span class="param-type">
<a link="SketchStyle.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchStyle" SketchStyle.html>SketchStyle</a>
</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="setSketchStyle" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#setSketchStyle" SketchEditor.html#setSketchStyle>SketchEditor#setSketchStyle</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<h4 class="name" id="setSnapAndReferGeometries">
<a class="href-link" href="#setSnapAndReferGeometries">#</a>
<span class="code-name" id="setSnapAndReferGeometries" style="font-size:30px">
setSnapAndReferGeometries<span class="signature">(geometries)</span>
</span>
</h4>
<div class="description">
<p>设置捕获和线造区边界参考几何图形集合</p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>geometries</code></td>
<td class="type">
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Geometry.html">Geometry</a>>
</span>
</td>
<td class="description last"><p>几何图形集合</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="setSnapAndReferGeometries" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#setSnapAndReferGeometries" SketchEditor.html#setSnapAndReferGeometries>SketchEditor#setSnapAndReferGeometries</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<h4 class="name" id="setSnapOption">
<a class="href-link" href="#setSnapOption">#</a>
<span class="code-name" id="setSnapOption" style="font-size:30px">
setSnapOption<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>设置捕捉配置项</p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th style="min-width: 100px;">默认值</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>snapOption.isSnapVertexCoincident</code></td>
<td class="type">
<span class="param-type">
Boolean
</span>
</td>
<td class="default">
false
</td>
<td class="description last"><p>是否自动捕捉顶点重合</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>snapOption.isSnapVertexInLine</code></td>
<td class="type">
<span class="param-type">
Boolean
</span>
</td>
<td class="default">
false
</td>
<td class="description last"><p>是否自动捕捉线上的点</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>snapOption.isSnapPerpendicular</code></td>
<td class="type">
<span class="param-type">
Boolean
</span>
</td>
<td class="default">
false
</td>
<td class="description last"><p>是否自动捕捉垂线垂点</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>snapOption.isSnapParallel</code></td>
<td class="type">
<span class="param-type">
Boolean
</span>
</td>
<td class="default">
false
</td>
<td class="description last"><p>是否自动捕捉平行线</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>snapOption.snapSketchGeometry</code></td>
<td class="type">
<span class="param-type">
Boolean
</span>
</td>
<td class="default">
false
</td>
<td class="description last"><p>是否捕捉正在绘制的图形的边界</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>snapOption.pixelTolerance</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="default">
10
</td>
<td class="description last"><p>捕获像素容差</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="setSnapOption" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#setSnapOption" SketchEditor.html#setSnapOption>SketchEditor#setSnapOption</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<h4 class="name" id="split">
<a class="href-link" href="#split">#</a>
<span class="code-name" id="split" style="font-size:30px">
split<span class="signature">(target, splitPolyline)</span>
</span>
</h4>
<div class="description">
<p>分割草图对象或区几何对象<a id='split'></a></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>target</code></td>
<td class="type">
<span class="param-type">
<a link="Polygon.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Polygon" Polygon.html>Polygon</a>
</span>
|
<span class="param-type">
<a link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor" SketchEditor.html>SketchEditor</a>
</span>
</td>
<td class="description last"><p>被分割的几何/草图对象</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>splitPolyline</code></td>
<td class="type">
<span class="param-type">
Polyline
</span>
</td>
<td class="description last"><p>线几何对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="split" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#split" SketchEditor.html#split>SketchEditor#split</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>分割后的几何对象</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Polygon.html">Polygon</a>>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="start">
<a class="href-link" href="#start">#</a>
<span class="code-name" id="start" style="font-size:30px">
start<span class="signature">(data, extendOptions)</span>
</span>
</h4>
<div class="description">
<p>开始(鼠标)绘制草图<a id='start'></a>
根据传入绘制草图类型,开始鼠标绘制。<br/>
绘制点图形,鼠标单击即绘制。<br/>
绘制线图形,鼠标单击绘制线的一个顶点;鼠标移动,延长线图形;鼠标双击,完成线图形绘制。<br/>
绘制区图形,鼠标单击绘制区的一个顶点;鼠标移动,区图形随鼠标位置变动;鼠标双击,完成区图形绘制。<br/></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">
<a link="SketchDataType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchDataType" global.html#SketchDataType>SketchDataType</a>
</span>
|
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</td>
<td class="description last"><p>绘制的草图类型或几何对象</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>extendOptions</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="description last"><p>草图编辑的扩展属性,可以通过该属性传入草图编辑额外需要的参数</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>vertexNumber</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="description last"><p>绘制线/区时的顶点限制数量。(例如绘制直线,则vertexNumber=2;绘制直三角形,则vertexNumber=3。)</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="start" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#start" SketchEditor.html#start>SketchEditor#start</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<h4 class="name" id="startCustomDrawTool">
<a class="href-link" href="#startCustomDrawTool">#</a>
<span class="code-name" id="startCustomDrawTool" style="font-size:30px">
startCustomDrawTool<span class="signature">(CustomDrawTool)</span>
</span>
</h4>
<div class="description">
<p>开始(鼠标)绘制自定义草图图形<a id='startCustomDrawTool'></a></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>CustomDrawTool</code></td>
<td class="type">
<span class="param-type">
Class.<<a onclick="getTypeHTML(event)" link="SketchBaseDrawTool.html">SketchBaseDrawTool</a>>
</span>
</td>
<td class="description last"><p>自定义草图图形工具类</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="startCustomDrawTool" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#startCustomDrawTool" SketchEditor.html#startCustomDrawTool>SketchEditor#startCustomDrawTool</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<h4 class="name" id="stop">
<a class="href-link" href="#stop">#</a>
<span class="code-name" id="stop" style="font-size:30px">
stop<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>停止鼠标绘制草图<a id='stop'></a></p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="stop" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#stop" SketchEditor.html#stop>SketchEditor#stop</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<h4 class="name" id="undo">
<a class="href-link" href="#undo">#</a>
<span class="code-name" id="undo" style="font-size:30px">
undo<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>撤销当前编辑操作<a id='undo'></a></p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="undo" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#undo" SketchEditor.html#undo>SketchEditor#undo</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>撤销后的几何对象</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="union">
<a class="href-link" href="#union">#</a>
<span class="code-name" id="union" style="font-size:30px">
union<span class="signature">(polygons)</span>
</span>
</h4>
<div class="description">
<p>合并多个区几何<a id='union'></a></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>polygons</code></td>
<td class="type">
<span class="param-type">
<a link="Polygon.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Polygon" Polygon.html>Polygon</a>
</span>
</td>
<td class="description last"><p>被合并的区几何对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="union" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#union" SketchEditor.html#union>SketchEditor#union</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>合并后的几何对象</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
<a link="Polygon.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Polygon" Polygon.html>Polygon</a>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="updateVertex">
<a class="href-link" href="#updateVertex">#</a>
<span class="code-name" id="updateVertex" style="font-size:30px">
updateVertex<span class="signature">(point, index)</span>
</span>
</h4>
<div class="description">
<p>更新当前选中线或区草图图形的某个顶点<a id='updateVertex'></a></p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>point</code></td>
<td class="type">
<span class="param-type">
<a link="Point.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Point" Point.html>Point</a>
</span>
</td>
<td class="description last"><p>新的顶点</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="description last"><p>需更新的顶点的序号</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="updateVertex" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#updateVertex" SketchEditor.html#updateVertex>SketchEditor#updateVertex</a>
</li></ul></dd>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>改变后的图形几何</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class='vertical-section' style='margin-top: 10px'>
<h3 id='event'>事件</h3>
<h4 style="margin-top: 20px;margin-bottom: 20px;">事件概述</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code><a href="#创建草图图形时事件">创建草图图形时事件</a></code></td>
<td class="name"><code>创建草图图形时事件</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#标绘制线或区的一个顶点完成事件(废弃)">标绘制线或区的一个顶点完成事件(废弃)</a></code></td>
<td class="name"><code>标绘制线或区的一个顶点完成事件(废弃)</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#移除草图图形事件">移除草图图形事件</a></code></td>
<td class="name"><code>移除草图图形事件</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#编辑草图图形时事件">编辑草图图形时事件</a></code></td>
<td class="name"><code>编辑草图图形时事件</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#草图绘制完成事件">草图绘制完成事件</a></code></td>
<td class="name"><code>草图绘制完成事件</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#草图绘制完成事件(废弃)">草图绘制完成事件(废弃)</a></code></td>
<td class="name"><code>草图绘制完成事件(废弃)</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#草图编辑器回退事件">草图编辑器回退事件</a></code></td>
<td class="name"><code>草图编辑器回退事件</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#草图编辑器撤销事件">草图编辑器撤销事件</a></code></td>
<td class="name"><code>草图编辑器撤销事件</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#草图被选中事件(废弃)">草图被选中事件(废弃)</a></code></td>
<td class="name"><code>草图被选中事件(废弃)</code></td>
</tr>
</tbody>
</table>
</div>
<h4 style="margin-top: 20px;margin-bottom: 20px;">事件详情</h4>
<div class="members">
<div class="member">
<h4 class="name" id="event:%E5%88%9B%E5%BB%BA%E8%8D%89%E5%9B%BE%E5%9B%BE%E5%BD%A2%E6%97%B6%E4%BA%8B%E4%BB%B6">
<a class="href-link" href="#event:%E5%88%9B%E5%BB%BA%E8%8D%89%E5%9B%BE%E5%9B%BE%E5%BD%A2%E6%97%B6%E4%BA%8B%E4%BB%B6">#</a>
<span class="code-name" id="创建草图图形时事件" style="font-size:30px">
创建草图图形时事件
</span>
</h4>
<h5 class="subsection-title">属性:</h5>
<div class="table-container">
<table class="props table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">
<a link="SketchEditorEvent.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditorEvent" SketchEditorEvent.html>SketchEditorEvent</a>
</span>
</td>
<td class="description last"><p>事件消息体对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="event:创建草图图形时事件" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#event:创建草图图形时事件" SketchEditor.html#event:%25E5%2588%259B%25E5%25BB%25BA%25E8%258D%2589%25E5%259B%25BE%25E5%259B%25BE%25E5%25BD%25A2%25E6%2597%25B6%25E4%25BA%258B%25E4%25BB%25B6>SketchEditor#event:创建草图图形时事件</a>
</li></ul></dd>
</dl>
<h5>示例</h5>
<p class="code-caption"><h7>创建草图图形时事件</h7></p>
<pre class="prettyprint"><code>sketchEditor.on('create', (event) => {
console.log("被选中事件:", event)
})</code></pre>
</div>
<div class="member">
<h4 class="name" id="event:%E6%A0%87%E7%BB%98%E5%88%B6%E7%BA%BF%E6%88%96%E5%8C%BA%E7%9A%84%E4%B8%80%E4%B8%AA%E9%A1%B6%E7%82%B9%E5%AE%8C%E6%88%90%E4%BA%8B%E4%BB%B6%EF%BC%88%E5%BA%9F%E5%BC%83%EF%BC%89">
<a class="href-link" href="#event:%E6%A0%87%E7%BB%98%E5%88%B6%E7%BA%BF%E6%88%96%E5%8C%BA%E7%9A%84%E4%B8%80%E4%B8%AA%E9%A1%B6%E7%82%B9%E5%AE%8C%E6%88%90%E4%BA%8B%E4%BB%B6%EF%BC%88%E5%BA%9F%E5%BC%83%EF%BC%89">#</a>
<span class="code-name" id="标绘制线或区的一个顶点完成事件(废弃)" style="font-size:30px">
标绘制线或区的一个顶点完成事件(废弃)
</span>
</h4>
<h5 class="subsection-title">属性:</h5>
<div class="table-container">
<table class="props table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>事件对象</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">
<a link="LayerEventType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LayerEventType" global.html#LayerEventType>LayerEventType</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
'drawn-vertex'
</td>
<td class="description last"><p>事件类型</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>geometry</code></td>
<td class="type">
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>绘制的几何对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="event:标绘制线或区的一个顶点完成事件(废弃)" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#event:标绘制线或区的一个顶点完成事件(废弃)" SketchEditor.html#event:%25E6%25A0%2587%25E7%25BB%2598%25E5%2588%25B6%25E7%25BA%25BF%25E6%2588%2596%25E5%258C%25BA%25E7%259A%2584%25E4%25B8%2580%25E4%25B8%25AA%25E9%25A1%25B6%25E7%2582%25B9%25E5%25AE%258C%25E6%2588%2590%25E4%25BA%258B%25E4%25BB%25B6%25EF%25BC%2588%25E5%25BA%259F%25E5%25BC%2583%25EF%25BC%2589>SketchEditor#event:标绘制线或区的一个顶点完成事件(废弃)</a>
</li></ul></dd>
</dl>
<h5>示例</h5>
<p class="code-caption"><h7>鼠标绘制线或区的一个顶点完成事件</h7></p>
<pre class="prettyprint"><code>sketchEditor.on('drawn-vertex', (event) => {
console.log("绘制的几何对象:", event.geometry)
})</code></pre>
</div>
<div class="member">
<h4 class="name" id="event:%E7%A7%BB%E9%99%A4%E8%8D%89%E5%9B%BE%E5%9B%BE%E5%BD%A2%E4%BA%8B%E4%BB%B6">
<a class="href-link" href="#event:%E7%A7%BB%E9%99%A4%E8%8D%89%E5%9B%BE%E5%9B%BE%E5%BD%A2%E4%BA%8B%E4%BB%B6">#</a>
<span class="code-name" id="移除草图图形事件" style="font-size:30px">
移除草图图形事件
</span>
</h4>
<h5 class="subsection-title">属性:</h5>
<div class="table-container">
<table class="props table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">
<a link="SketchEditorEvent.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditorEvent" SketchEditorEvent.html>SketchEditorEvent</a>
</span>
</td>
<td class="description last"><p>事件消息体对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="event:移除草图图形事件" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#event:移除草图图形事件" SketchEditor.html#event:%25E7%25A7%25BB%25E9%2599%25A4%25E8%258D%2589%25E5%259B%25BE%25E5%259B%25BE%25E5%25BD%25A2%25E4%25BA%258B%25E4%25BB%25B6>SketchEditor#event:移除草图图形事件</a>
</li></ul></dd>
</dl>
<h5>示例</h5>
<p class="code-caption"><h7>移除草图图形事件</h7></p>
<pre class="prettyprint"><code>sketchEditor.on('remove', (event) => {
console.log("被选中事件:", event)
})</code></pre>
</div>
<div class="member">
<h4 class="name" id="event:%E7%BC%96%E8%BE%91%E8%8D%89%E5%9B%BE%E5%9B%BE%E5%BD%A2%E6%97%B6%E4%BA%8B%E4%BB%B6">
<a class="href-link" href="#event:%E7%BC%96%E8%BE%91%E8%8D%89%E5%9B%BE%E5%9B%BE%E5%BD%A2%E6%97%B6%E4%BA%8B%E4%BB%B6">#</a>
<span class="code-name" id="编辑草图图形时事件" style="font-size:30px">
编辑草图图形时事件
</span>
</h4>
<h5 class="subsection-title">属性:</h5>
<div class="table-container">
<table class="props table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">
<a link="SketchEditorEvent.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditorEvent" SketchEditorEvent.html>SketchEditorEvent</a>
</span>
</td>
<td class="description last"><p>事件消息体对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="event:编辑草图图形时事件" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#event:编辑草图图形时事件" SketchEditor.html#event:%25E7%25BC%2596%25E8%25BE%2591%25E8%258D%2589%25E5%259B%25BE%25E5%259B%25BE%25E5%25BD%25A2%25E6%2597%25B6%25E4%25BA%258B%25E4%25BB%25B6>SketchEditor#event:编辑草图图形时事件</a>
</li></ul></dd>
</dl>
<h5>示例</h5>
<p class="code-caption"><h7>编辑草图图形时事件</h7></p>
<pre class="prettyprint"><code>sketchEditor.on('update', (event) => {
console.log("编辑图形时事件:", event)
})</code></pre>
</div>
<div class="member">
<h4 class="name" id="event:%E8%8D%89%E5%9B%BE%E7%BB%98%E5%88%B6%E5%AE%8C%E6%88%90%E4%BA%8B%E4%BB%B6">
<a class="href-link" href="#event:%E8%8D%89%E5%9B%BE%E7%BB%98%E5%88%B6%E5%AE%8C%E6%88%90%E4%BA%8B%E4%BB%B6">#</a>
<span class="code-name" id="草图绘制完成事件" style="font-size:30px">
草图绘制完成事件
</span>
</h4>
<h5 class="subsection-title">属性:</h5>
<div class="table-container">
<table class="props table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>eventName</code></td>
<td class="type">
<span class="param-type">
<a link="SketchEditorEventType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditorEventType" global.html#SketchEditorEventType>SketchEditorEventType</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>事件类型</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>事件对象</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>toolEventInfo</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>事件类型</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>toolEventInfo.type</code></td>
<td class="type">
<span class="param-type">
<a link="SketchEditorToolEventType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditorToolEventType" global.html#SketchEditorToolEventType>SketchEditorToolEventType</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>草图编辑工具事件类型</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">
<a link="SketchEditorState.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditorState" global.html#SketchEditorState>SketchEditorState</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
SketchEditorState.create
</td>
<td class="description last"><p>创建或编辑时,草图图形子状态</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>feature</code></td>
<td class="type">
<span class="param-type">
<a link="Feature.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Feature" Feature.html>Feature</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>要素对象</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>geometry</code></td>
<td class="type">
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>几何对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="event:草图绘制完成事件" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#event:草图绘制完成事件" SketchEditor.html#event:%25E8%258D%2589%25E5%259B%25BE%25E7%25BB%2598%25E5%2588%25B6%25E5%25AE%258C%25E6%2588%2590%25E4%25BA%258B%25E4%25BB%25B6>SketchEditor#event:草图绘制完成事件</a>
</li></ul></dd>
</dl>
<h5>示例</h5>
<p class="code-caption"><h7>鼠标绘制完成事件</h7></p>
<pre class="prettyprint"><code>sketchEditor.on(SketchEditorEventType.create, (event) => {
console.log("绘制的要素对象:", event.feature)
})</code></pre>
</div>
<div class="member">
<h4 class="name" id="event:%E8%8D%89%E5%9B%BE%E7%BB%98%E5%88%B6%E5%AE%8C%E6%88%90%E4%BA%8B%E4%BB%B6%EF%BC%88%E5%BA%9F%E5%BC%83%EF%BC%89">
<a class="href-link" href="#event:%E8%8D%89%E5%9B%BE%E7%BB%98%E5%88%B6%E5%AE%8C%E6%88%90%E4%BA%8B%E4%BB%B6%EF%BC%88%E5%BA%9F%E5%BC%83%EF%BC%89">#</a>
<span class="code-name" id="草图绘制完成事件(废弃)" style="font-size:30px">
草图绘制完成事件(废弃)
</span>
</h4>
<h5 class="subsection-title">属性:</h5>
<div class="table-container">
<table class="props table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>事件对象</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">
<a link="LayerEventType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LayerEventType" global.html#LayerEventType>LayerEventType</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
'drawn'
</td>
<td class="description last"><p>事件类型</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>geometry</code></td>
<td class="type">
<span class="param-type">
<a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>绘制的几何对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="event:草图绘制完成事件(废弃)" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#event:草图绘制完成事件(废弃)" SketchEditor.html#event:%25E8%258D%2589%25E5%259B%25BE%25E7%25BB%2598%25E5%2588%25B6%25E5%25AE%258C%25E6%2588%2590%25E4%25BA%258B%25E4%25BB%25B6%25EF%25BC%2588%25E5%25BA%259F%25E5%25BC%2583%25EF%25BC%2589>SketchEditor#event:草图绘制完成事件(废弃)</a>
</li></ul></dd>
</dl>
<h5>示例</h5>
<p class="code-caption"><h7>鼠标绘制完成事件</h7></p>
<pre class="prettyprint"><code>sketchEditor.on('drawn', (event) => {
console.log("绘制的几何对象:", event.geometry)
})</code></pre>
</div>
<div class="member">
<h4 class="name" id="event:%E8%8D%89%E5%9B%BE%E7%BC%96%E8%BE%91%E5%99%A8%E5%9B%9E%E9%80%80%E4%BA%8B%E4%BB%B6">
<a class="href-link" href="#event:%E8%8D%89%E5%9B%BE%E7%BC%96%E8%BE%91%E5%99%A8%E5%9B%9E%E9%80%80%E4%BA%8B%E4%BB%B6">#</a>
<span class="code-name" id="草图编辑器回退事件" style="font-size:30px">
草图编辑器回退事件
</span>
</h4>
<h5 class="subsection-title">属性:</h5>
<div class="table-container">
<table class="props table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">
<a link="SketchEditorEvent.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditorEvent" SketchEditorEvent.html>SketchEditorEvent</a>
</span>
</td>
<td class="description last"><p>事件消息体对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="event:草图编辑器回退事件" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#event:草图编辑器回退事件" SketchEditor.html#event:%25E8%258D%2589%25E5%259B%25BE%25E7%25BC%2596%25E8%25BE%2591%25E5%2599%25A8%25E5%259B%259E%25E9%2580%2580%25E4%25BA%258B%25E4%25BB%25B6>SketchEditor#event:草图编辑器回退事件</a>
</li></ul></dd>
</dl>
<h5>示例</h5>
<p class="code-caption"><h7>草图编辑器回退事件</h7></p>
<pre class="prettyprint"><code>sketchEditor.on('redo', (event) => {
console.log("被选中事件:", event.selectedSketch)
})</code></pre>
</div>
<div class="member">
<h4 class="name" id="event:%E8%8D%89%E5%9B%BE%E7%BC%96%E8%BE%91%E5%99%A8%E6%92%A4%E9%94%80%E4%BA%8B%E4%BB%B6">
<a class="href-link" href="#event:%E8%8D%89%E5%9B%BE%E7%BC%96%E8%BE%91%E5%99%A8%E6%92%A4%E9%94%80%E4%BA%8B%E4%BB%B6">#</a>
<span class="code-name" id="草图编辑器撤销事件" style="font-size:30px">
草图编辑器撤销事件
</span>
</h4>
<h5 class="subsection-title">属性:</h5>
<div class="table-container">
<table class="props table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">
<a link="SketchEditorEvent.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditorEvent" SketchEditorEvent.html>SketchEditorEvent</a>
</span>
</td>
<td class="description last"><p>事件消息体对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="event:草图编辑器撤销事件" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#event:草图编辑器撤销事件" SketchEditor.html#event:%25E8%258D%2589%25E5%259B%25BE%25E7%25BC%2596%25E8%25BE%2591%25E5%2599%25A8%25E6%2592%25A4%25E9%2594%2580%25E4%25BA%258B%25E4%25BB%25B6>SketchEditor#event:草图编辑器撤销事件</a>
</li></ul></dd>
</dl>
<h5>示例</h5>
<p class="code-caption"><h7>草图编辑器撤销事件</h7></p>
<pre class="prettyprint"><code>sketchEditor.on('undo', (event) => {
console.log("被选中事件:", event)
})</code></pre>
</div>
<div class="member">
<h4 class="name" id="event:%E8%8D%89%E5%9B%BE%E8%A2%AB%E9%80%89%E4%B8%AD%E4%BA%8B%E4%BB%B6%EF%BC%88%E5%BA%9F%E5%BC%83%EF%BC%89">
<a class="href-link" href="#event:%E8%8D%89%E5%9B%BE%E8%A2%AB%E9%80%89%E4%B8%AD%E4%BA%8B%E4%BB%B6%EF%BC%88%E5%BA%9F%E5%BC%83%EF%BC%89">#</a>
<span class="code-name" id="草图被选中事件(废弃)" style="font-size:30px">
草图被选中事件(废弃)
</span>
</h4>
<h5 class="subsection-title">属性:</h5>
<div class="table-container">
<table class="props table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>事件对象</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">
<a link="LayerEventType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LayerEventType" global.html#LayerEventType>LayerEventType</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
'selected'
</td>
<td class="description last"><p>事件类型</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>selectedSketch</code></td>
<td class="type">
<span class="param-type">
SketchEditorLeaflet
</span>
|
<span class="param-type">
<a link="SketchEditorCesium.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditorCesium" SketchEditorCesium.html>SketchEditorCesium</a>
</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>被选中的草图对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="event:草图被选中事件(废弃)" link="SketchEditor.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SketchEditor#event:草图被选中事件(废弃)" SketchEditor.html#event:%25E8%258D%2589%25E5%259B%25BE%25E8%25A2%25AB%25E9%2580%2589%25E4%25B8%25AD%25E4%25BA%258B%25E4%25BB%25B6%25EF%25BC%2588%25E5%25BA%259F%25E5%25BC%2583%25EF%25BC%2589>SketchEditor#event:草图被选中事件(废弃)</a>
</li></ul></dd>
</dl>
<h5>示例</h5>
<p class="code-caption"><h7>草图被鼠标选中事件</h7></p>
<pre class="prettyprint"><code>sketchEditor.on('selected', (event) => {
console.log("被选中事件:", event.selectedSketch)
})</code></pre>
</div>
</div>
</div>
</article>
</section>