@mapgis/webclient-common
Version:
mapgis ES6 format for igserver
3,103 lines (1,155 loc) • 79.1 kB
HTML
<header id="page-title" class="page-title">
<span class="page-title-main">类名</span>
<span class="page-title-sub">MultiLineString</span>
</header>
<section>
<article>
<div class="container-overview">
<div class='vertical-section'>
<div class="members">
<div class="member">
<h4 class="name" id="MultiLineString">
<a class="href-link" href="#MultiLineString">#</a>
<span class="code-name" id="MultiLineString" style="font-size:30px">
new MultiLineString<span class="signature">(options)</span>
</span>
</h4>
<div class="description">
<p>多线段几何
<br><br>[ES5引入方式]:<br/>
Zondy.Geometry.MultiLineString() <br/>
[ES6引入方式]:<br/>
import { MultiLineString } from "@mapgis/webclient-common" <br/>
<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>options</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="default">
</td>
<td class="description last"><p>构造参数</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>coordinates</code></td>
<td class="type">
<span class="param-type">
Array
</span>
</td>
<td class="default">
[]
</td>
<td class="description last"><p>几何点的坐标数组,支持任意单位,参考示例:<a href='#LineString'>[多线段几何对象]</a></p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>spatialReference</code></td>
<td class="type">
<span class="param-type">
<a link="SpatialReference.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SpatialReference" SpatialReference.html>SpatialReference</a>
</span>
</td>
<td class="default">
new Zondy.SpatialReference('EPSG:4326')
</td>
<td class="description last"><p>几何点的空间参考系,默认4326,当不是4326时请指定坐标系,方便进行投影转换,参考示例:<a href='#SpatialReference'>[指定坐标系]</a></p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<p class="summary"><h5>支持如下方法:</h5>
<a href='#addPath'>[1、添加线段]</a><br/>
<a href='#removePath'>[2、移除线段]</a><br/>
<a href='#getPoint'>[3、获取指定线段上的点]</a><br/>
<a href='#insertPoint'>[4、插入点到指定线段上]</a><br/>
<a href='#removePoint'>[5、删除指定线段上的点]</a><br/>
<a href='#setPoint'>[6、修改指定线段上的点]</a><br/>
<a href='#toString'>[7、返回字符串]</a><br/>
<a href='#toXMl'>[8、导出为OGC服务要求的xml字符串]</a><br/>
<a href='#getIGSType'>[9、返回IGS所对应的GeometryModule型]</a><br/>
<a href='#toOldIGSGeometry'>[10、返回igs1.0的几何对象]</a>
<a href='#fromJSON'>[11、通过传入的json构造并返回一个新的几何对象]</a><br/>
<a href='#toJSON'>[12、导出为json对象]</a><br/>
<a class="mapgis-link-name" title="Geometry#clone" Geometry.html#clone><code>13、克隆几何对象</code></a></p>
<h5>示例</h5>
<p class="code-caption"><h7 id='MultiLineString'>创建几何对象</h7></p>
<pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString } = Zondy.Geometry
// ES6引入方式
import { MultiLineString } from "@mapgis/webclient-common"
new MultiLineString({
coordinates: [
// 第一个线几何
[
[100.0, 0.0],[101.0, 1.0]
],
// 第二个线几何
[
[102.0, 2.0],[103.0, 3.0]
]
]
})</code></pre>
<p class="code-caption"><h7 id='SpatialReference'>指定坐标系</h7></p>
<pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString } = Zondy.Geometry
const { SpatialReference } = Zondy
// ES6引入方式
import { MultiLineString, SpatialReference } from "@mapgis/webclient-common"
new MultiLineString({
// 3857坐标系的点
coordinates: [
// 第一个线几何
[
[12929863.44711455, 3934286.575385226],
[12060733.232006868, 3377247.5680546067]
],
// 第二个线几何
[
[12929863.44711455, 3934286.575385226],
[12060733.232006868, 3377247.5680546067]
]
],
// 当不是4326时请指定坐标系,方便进行投影转换
spatialReference: new SpatialReference('EPSG:3857')
})</code></pre>
</div>
</div>
</div>
</div>
<h3 class="subsection-title">继承关系</h3>
<ul>
<li><a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</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="#coordinates">coordinates</a></code></td>
<td class="name">
<code>
<span class="param-type">
Array
</span>
</code>
</td>
<td class="name"><code><p>几何点的坐标</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#extent">extent</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="#hasZ">hasZ</a></code></td>
<td class="name">
<code>
<span class="param-type">
Boolean
</span>
</code>
</td>
<td class="name"><code><p>是否含有z坐标</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#spatialReference">spatialReference</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="SpatialReference.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SpatialReference" SpatialReference.html>SpatialReference</a>
</span>
</code>
</td>
<td class="name"><code><p>几何点的空间参考系</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#type">type</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="GeometryType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="GeometryType" global.html#GeometryType>GeometryType</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">
Array
</span>
</span>
<h4 class="name" id="coordinates">
<a class="href-link" href="#coordinates">#</a>
<span class="code-name">
coordinates
</span>
</h4>
<div class="description">
<p>几何点的坐标</p>
</div>
<dl class="details">
</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="extent">
<a class="href-link" href="#extent">#</a>
<span class="code-name">
extent
</span>
</h4>
<div class="description">
<p>外包盒</p>
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a class="mapgis-link-name" title="Geometry#extent" Geometry.html#extent>Geometry#extent</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="hasZ">
<a class="href-link" href="#hasZ">#</a>
<span class='tag'>readonly</span>
<span class="code-name">
hasZ
</span>
</h4>
<div class="description">
<p>是否含有z坐标</p>
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a class="mapgis-link-name" title="Geometry#hasZ" Geometry.html#hasZ>Geometry#hasZ</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="SpatialReference.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SpatialReference" SpatialReference.html>SpatialReference</a>
</span>
</span>
<h4 class="name" id="spatialReference">
<a class="href-link" href="#spatialReference">#</a>
<span class="code-name">
spatialReference
</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="spatialReference" link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry#spatialReference" Geometry.html#spatialReference>Geometry#spatialReference</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="GeometryType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="GeometryType" global.html#GeometryType>GeometryType</a>
</span>
</span>
<h4 class="name" id="type">
<a class="href-link" href="#type">#</a>
<span class="code-name">
type
</span>
</h4>
<div class="description">
<p>几何类型</p>
</div>
<dl class="details">
</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="#clone">clone</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="MultiLineString.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MultiLineString" MultiLineString.html>MultiLineString</a>
</span>
</code>
</td>
<td class="name"><code><p>克隆几何对象</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#fromJSON">fromJSON</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>通过传入的json构造并返回一个新的几何对象</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#addPath">addPath</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="MultiLineString.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MultiLineString" MultiLineString.html>MultiLineString</a>
</span>
</code>
</td>
<td class="name"><code><p>添加线段</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#clone">clone</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>克隆几何对象</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#fromGeoJSON">fromGeoJSON</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>导入GeoJSON</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#getGeometryType">getGeometryType</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>获取GeometryModule型</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#getIGSType">getIGSType</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>返回IGS所对应的GeometryModule型</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#getPoint">getPoint</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="Point.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Point" Point.html>Point</a>
</span>
|
<span class="param-type">
null
</span>
</code>
</td>
<td class="name"><code><p>获取指定线段上的点</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#getType">getType</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>返回所对应的GeometryModule型</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#insertPoint">insertPoint</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="MultiLineString.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MultiLineString" MultiLineString.html>MultiLineString</a>
</span>
|
<span class="param-type">
null
</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="#removePath">removePath</a></code></td>
<td class="name">
<code>
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Point.html">Point</a>>
</span>
|
<span class="param-type">
null
</span>
</code>
</td>
<td class="name"><code><p>移除线段</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#removePoint">removePoint</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="MultiLineString.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MultiLineString" MultiLineString.html>MultiLineString</a>
</span>
</code>
</td>
<td class="name"><code><p>删除指定线段上的点</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#setPoint">setPoint</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="MultiLineString.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MultiLineString" MultiLineString.html>MultiLineString</a>
</span>
</code>
</td>
<td class="name"><code><p>修改指定线段上的点</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#toGeoJSON">toGeoJSON</a></code></td>
<td class="name">
<code>
<span class="param-type">
Object
</span>
</code>
</td>
<td class="name"><code><p>导出为GeoJSON</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#toJSON">toJSON</a></code></td>
<td class="name">
<code>
<span class="param-type">
Object
</span>
</code>
</td>
<td class="name"><code><p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#toOldIGSGeometry">toOldIGSGeometry</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>返回igs1.0的几何对象</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#toString">toString</a></code></td>
<td class="name">
<code>
</code>
</td>
<td class="name"><code><p>返回如下格式的字符串:"x0,y0,x1,y1,x2,y2"</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#toXMl">toXMl</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>导出为OGC服务要求的xml字符串</code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#toXML">toXML</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>导出为OGC服务要求的xml字符串,子类实现</p></code></td>
</tr>
</tbody>
</table>
</div>
<h4 style="margin-top: 20px;margin-bottom: 20px;">方法详情</h4>
<div class="member">
<h4 class="name" id=".clone">
<a class="href-link" href="#.clone">#</a>
<span class='tag'>static</span>
<span class="code-name" id="clone" style="font-size:30px">
clone<span class="signature">(multiLineString)</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>multiLineString</code></td>
<td class="type">
<span class="param-type">
<a link="MultiLineString.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MultiLineString" MultiLineString.html>MultiLineString</a>
</span>
</td>
<td class="description last"><p>被克隆的几何对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</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="MultiLineString.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MultiLineString" MultiLineString.html>MultiLineString</a>
</span>
</div>
</div>
</div>
</div>
<h5>示例</h5>
<p class="code-caption"><h7 id='clone'>克隆几何对象</h7></p>
<pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString } = Zondy.Geometry
// ES6引入方式
import { MultiLineString } from "@mapgis/webclient-common"
const multiLineString = new MultiLineString({
coordinates: [
// 第一个线几何
[
[100.0, 0.0],[101.0, 1.0]
],
// 第二个线几何
[
[102.0, 2.0],[103.0, 3.0]
]
]
})
const newMultiLineString = MultiLineString.clone(multiLineString)</code></pre>
</div>
<div class="member">
<h4 class="name" id=".fromJSON">
<a class="href-link" href="#.fromJSON">#</a>
<span class='tag'>static</span>
<span class="code-name" id="fromJSON" style="font-size:30px">
fromJSON<span class="signature">(json<span class="signature-attributes">opt</span>)</span>
</span>
</h4>
<div class="description">
<p>通过传入的json构造并返回一个新的几何对象</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>json</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="description last"><p>JSON对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<h5>示例</h5>
<p class="code-caption"><h7 id='fromJSON'>通过传入的json构造并返回一个新的几何对象</h7></p>
<pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString } = Zondy.Geometry
// ES6引入方式
import { MultiLineString } from "@mapgis/webclient-common"
const json = {
coordinates: [
// 第一个线几何
[
[100.0, 0.0],[101.0, 1.0]
],
// 第二个线几何
[
[102.0, 2.0],[103.0, 3.0]
]
]
}
const newMultiLineString = MultiLineString.fromJSON(json)</code></pre>
</div>
<div class="member">
<h4 class="name" id="addPath">
<a class="href-link" href="#addPath">#</a>
<span class="code-name" id="addPath" style="font-size:30px">
addPath<span class="signature">(points)</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>points</code></td>
<td class="type">
<span class="param-type">
Array.<<a onclick="getTypeHTML(event)" link="Point.html">Point</a>>
</span>
</td>
<td class="description last"><p>控制点组</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</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="MultiLineString.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MultiLineString" MultiLineString.html>MultiLineString</a>
</span>
</div>
</div>
</div>
</div>
<h5>示例</h5>
<p class="code-caption"><h7 id='addPath'>添加线段</h7></p>
<pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString, Point } = Zondy.Geometry
// ES6引入方式
import { MultiLineString, Point } from "@mapgis/webclient-common"
const multiLineString = new MultiLineString({
coordinates: [
// 第一个线几何
[
[100.0, 0.0],[101.0, 1.0]
],
// 第二个线几何
[
[102.0, 2.0],[103.0, 3.0]
]
]
})
const path = [
new Point({
coordinates: [100.0, 0.0]
}),
new Point({
coordinates: [101.0, 1.0]
}),
new Point({
coordinates: [102.0, 2.0]
})
]
multiLineString.addPath(path)</code></pre>
</div>
<div class="member">
<h4 class="name" id="clone">
<a class="href-link" href="#clone">#</a>
<span class="code-name" id="clone" style="font-size:30px">
clone<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>克隆几何对象</p>
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a class="mapgis-link-name" title="Geometry#clone" Geometry.html#clone>Geometry#clone</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="fromGeoJSON">
<a class="href-link" href="#fromGeoJSON">#</a>
<span class="code-name" id="fromGeoJSON" style="font-size:30px">
fromGeoJSON<span class="signature">(GeoJSON)</span>
</span>
</h4>
<div class="description">
<p>导入GeoJSON</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>GeoJSON</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="description last"><p>Object</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="fromGeoJSON" link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry#fromGeoJSON" Geometry.html#fromGeoJSON>Geometry#fromGeoJSON</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<h4 class="name" id="getGeometryType">
<a class="href-link" href="#getGeometryType">#</a>
<span class="code-name" id="getGeometryType" style="font-size:30px">
getGeometryType<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>获取GeometryModule型</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="getGeometryType" link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry#getGeometryType" Geometry.html#getGeometryType>Geometry#getGeometryType</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>GeometryModule型</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
String
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="getIGSType">
<a class="href-link" href="#getIGSType">#</a>
<span class="code-name" id="getIGSType" style="font-size:30px">
getIGSType<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>返回IGS所对应的GeometryModule型<a id='getIGSType'></a></p>
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a class="mapgis-link-name" title="Geometry#getIGSType" Geometry.html#getIGSType>Geometry#getIGSType</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>string GeometryModule型</p></div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="getPoint">
<a class="href-link" href="#getPoint">#</a>
<span class="code-name" id="getPoint" style="font-size:30px">
getPoint<span class="signature">(pathIndex, pointIndex)</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>pathIndex</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="description last"><p>路径下标</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>pointIndex</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">
</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="Point.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Point" Point.html>Point</a>
</span>
|
<span class="param-type">
null
</span>
</div>
</div>
</div>
</div>
<h5>示例</h5>
<p class="code-caption"><h7 id='getPoint'>获取指定线段上的点</h7></p>
<pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString } = Zondy.Geometry
// ES6引入方式
import { MultiLineString } from "@mapgis/webclient-common"
const multiLineString = new MultiLineString({
coordinates: [
// 第一个线几何
[
[100.0, 0.0],[101.0, 1.0]
],
// 第二个线几何
[
[102.0, 2.0],[103.0, 3.0]
]
]
})
const point = multiLineString.getPoint(0, 1)</code></pre>
</div>
<div class="member">
<h4 class="name" id="getType">
<a class="href-link" href="#getType">#</a>
<span class="code-name" id="getType" style="font-size:30px">
getType<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>返回所对应的GeometryModule型</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="getType" link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry#getType" Geometry.html#getType>Geometry#getType</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>GeometryModule型</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">
String
</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id="insertPoint">
<a class="href-link" href="#insertPoint">#</a>
<span class="code-name" id="insertPoint" style="font-size:30px">
insertPoint<span class="signature">(pathIndex, pointIndex, point)</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>pathIndex</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="description last"><p>路径下标</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>pointIndex</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="description last"><p>数组下标</p></td>
</tr>
<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>
</tbody>
</table>
</div>
<dl class="details">
</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="MultiLineString.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="MultiLineString" MultiLineString.html>MultiLineString</a>
</span>
|
<span class="param-type">
null
</span>
</div>
</div>
</div>
</div>
<h5>示例</h5>
<p class="code-caption"><h7 id='insertPoint'>插入点到指定线段上</h7></p>
<pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString, Point } = Zondy.Geometry
// ES6引入方式
import { MultiLineString, Point } from "@mapgis/webclient-common"
const multiLineString = new MultiLineString({
coordinates: [
// 第一个线几何
[
[100.0, 0.0],[101.0, 1.0]
],
// 第二个线几何
[
[102.0, 2.0],[103.0, 3.0]
]
]
})
const point = new Point({
coordinates: [102.0, 2.0]
})
multiLineString.insertPoint(0, 1, point)</code></pre>
</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">
<