UNPKG

@mapgis/webclient-common

Version:

mapgis ES6 format for igserver

1,715 lines (568 loc) 28.1 kB
<header id="page-title" class="page-title"> <span class="page-title-main">类名</span> <span class="page-title-sub">LineSymbol3DLayer</span> </header> <section> <article> <div class="container-overview"> <div class='vertical-section'> <div class="members"> <div class="member"> <h4 class="name" id="LineSymbol3DLayer"> <a class="href-link" href="#LineSymbol3DLayer">#</a> <span class="code-name" id="LineSymbol3DLayer" style="font-size:30px"> new LineSymbol3DLayer<span class="signature">(options)</span> </span> </h4> <div class="description"> <p>三维线符号图层,用来在三维场景中绘制二维线,不支持二维地图视图<br/> 示例如下:<br/> <a href='#LineSymbol3DLayer'>[1、创建三维线符号图层]</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" id="options"><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" id="size"><code>size</code></td> <td class="type"> <span class="param-type">Number</span> </td> <td class="default"> 1 </td> <td class="description last"><p>线宽度</p></td> </tr> <tr class="deep-level-1"> <td class="name" id="material"><code>material</code></td> <td class="type"> <span class="param-type"><a link="ColorMaterial.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="ColorMaterial" ColorMaterial.html>ColorMaterial</a></span> </td> <td class="default"> new ColorMaterial() </td> <td class="description last"><p>线的材质,目前支持的材质有:<br/> ColorMaterial: 纯色材质,通过设置纯色材质来改变线的颜色</p></td> </tr> <tr class="deep-level-1"> <td class="name" id="pattern"><code>pattern</code></td> <td class="type"> <span class="param-type"><a link="LineStylePattern3D.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineStylePattern3D" LineStylePattern3D.html>LineStylePattern3D</a></span> </td> <td class="default"> new LineStylePattern3D() </td> <td class="description last"><p>三维虚线样式,仅当线材质为ColorMaterial时生效</p></td> </tr> <tr class="deep-level-1"> <td class="name" id="cap"><code>cap</code></td> <td class="type"> <span class="param-type"><a link="LineCapType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineCapType" global.html#LineCapType>LineCapType</a></span> </td> <td class="default"> LineCapType.butt </td> <td class="description last"><p>线首尾端点样式</p></td> </tr> <tr class="deep-level-1"> <td class="name" id="join"><code>join</code></td> <td class="type"> <span class="param-type"><a link="LineJoinType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineJoinType" global.html#LineJoinType>LineJoinType</a></span> </td> <td class="default"> LineJoinType.miter </td> <td class="description last"><p>线拐角样式</p></td> </tr> <tr class="deep-level-1"> <td class="name" id="marker"><code>marker</code></td> <td class="type"> <span class="param-type"><a link="LineStyleMarker3D.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineStyleMarker3D" LineStyleMarker3D.html>LineStyleMarker3D</a></span> </td> <td class="default"> null </td> <td class="description last"><p>线端点的Marker参数</p></td> </tr> </tbody> </table> </div> <dl class="details"> </dl> <p class="summary"><h5>支持如下方法:</h5> <a href='#fromJSON'>[1、通过json数据构造一个LineSymbol3DLayer对象]</a><br/> <a href='#toJSON'>[2、导出为json数据]</a><br/> <a href='#clone'>[3、克隆并返回一个新的LineSymbol3DLayer对象]</a><br/></p> <h5>示例</h5> <p class="code-caption"><h7 id='LineSymbol3DLayer'>创建三维线符号图层</h7></p> <pre class="prettyprint"><code>// ES5引入方式 const { LineCapType, LineJoinType } = Zondy.Enum const { LineStyleMarker3D, ColorMaterial, LineStylePattern3D } = Zondy.Symbol // ES6引入方式 import { LineCapType, LineJoinType, LineStyleMarker3D, ColorMaterial, LineStylePattern3D } from "@mapgis/webclient-common" // 创建三维线符号图层 const lineSymbol3DLayer = new LineSymbol3DLayer({ // 设置线宽度 size: 4, // 设置线首尾端点样式 cap: LineCapType.butt, // 设置线拐角样式 join: LineJoinType.miter, // 设置线端点的Marker参数 marker: new LineStyleMarker3D(), // 设置线的材质 material: new ColorMaterial(), // 设置三维虚线样式 pattern: new LineStylePattern3D() })</code></pre> </div> </div> </div> </div> <h3 class="subsection-title">继承关系</h3> <ul> <li><a link="Symbol3DLayer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Symbol3DLayer" Symbol3DLayer.html>Symbol3DLayer</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="#cap">cap</a></code></td> <td class="name"> <code> <span class="param-type"><a link="LineCapType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineCapType" global.html#LineCapType>LineCapType</a></span> </code> </td> <td class="name"><code><p>线首尾端点样式</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#color">color</a></code></td> <td class="name"> <code> <span class="param-type"><a link="Color.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Color" Color.html>Color</a></span> </code> </td> <td class="name"><code><p>颜色</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#extendOptions">extendOptions</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="#join">join</a></code></td> <td class="name"> <code> <span class="param-type"><a link="LineJoinType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineJoinType" global.html#LineJoinType>LineJoinType</a></span> </code> </td> <td class="name"><code><p>线拐角样式</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#marker">marker</a></code></td> <td class="name"> <code> <span class="param-type"><a link="LineStyleMarker3D.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineStyleMarker3D" LineStyleMarker3D.html>LineStyleMarker3D</a></span> </code> </td> <td class="name"><code><p>线端点的Marker参数</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#material">material</a></code></td> <td class="name"> <code> <span class="param-type"><a link="ColorMaterial.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="ColorMaterial" ColorMaterial.html>ColorMaterial</a></span> </code> </td> <td class="name"><code><p>材质</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#pattern">pattern</a></code></td> <td class="name"> <code> <span class="param-type"><a link="LineStylePattern3D.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineStylePattern3D" LineStylePattern3D.html>LineStylePattern3D</a></span> </code> </td> <td class="name"><code><p>三维虚线样式</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#size">size</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="#type">type</a></code></td> <td class="name"> <code> <span class="param-type"><a link="Symbol3DLayerType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Symbol3DLayerType" global.html#Symbol3DLayerType>Symbol3DLayerType</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"><a link="LineCapType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineCapType" global.html#LineCapType>LineCapType</a></span> </span> <h4 class="name" id="cap"> <a class="href-link" href="#cap">#</a> <span class="code-name"> cap </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"><a link="Color.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Color" Color.html>Color</a></span> </span> <h4 class="name" id="color"> <a class="href-link" href="#color">#</a> <span class="code-name"> color </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="color" link="Symbol.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Symbol#color" Symbol.html#color>Symbol#color</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="extendOptions"> <a class="href-link" href="#extendOptions">#</a> <span class="code-name"> extendOptions </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="extendOptions" link="Symbol.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Symbol#extendOptions" Symbol.html#extendOptions>Symbol#extendOptions</a> </li></ul></dd> </dl> </div> <div class="member"> <span class="method-parameter is-pulled-right"> <label>类型:</label> <span class="param-type"><a link="LineJoinType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineJoinType" global.html#LineJoinType>LineJoinType</a></span> </span> <h4 class="name" id="join"> <a class="href-link" href="#join">#</a> <span class="code-name"> join </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"><a link="LineStyleMarker3D.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineStyleMarker3D" LineStyleMarker3D.html>LineStyleMarker3D</a></span> </span> <h4 class="name" id="marker"> <a class="href-link" href="#marker">#</a> <span class="code-name"> marker </span> </h4> <div class="description"> <p>线端点的Marker参数</p> </div> <dl class="details"> </dl> </div> <div class="member"> <span class="method-parameter is-pulled-right"> <label>类型:</label> <span class="param-type"><a link="ColorMaterial.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="ColorMaterial" ColorMaterial.html>ColorMaterial</a></span> </span> <h4 class="name" id="material"> <a class="href-link" href="#material">#</a> <span class="code-name"> material </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"><a link="LineStylePattern3D.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineStylePattern3D" LineStylePattern3D.html>LineStylePattern3D</a></span> </span> <h4 class="name" id="pattern"> <a class="href-link" href="#pattern">#</a> <span class="code-name"> pattern </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="size"> <a class="href-link" href="#size">#</a> <span class="code-name"> size </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"><a link="Symbol3DLayerType.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Symbol3DLayerType" global.html#Symbol3DLayerType>Symbol3DLayerType</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"> <dt class="tag-overrides">Overrides:</dt> <dd class="tag-overrides"><ul class="dummy"><li> <a class="mapgis-link-name" title="Symbol3DLayer#type" Symbol3DLayer.html#type>Symbol3DLayer#type</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="#fromJSON">fromJSON</a></code></td> <td class="name"> <code> <span class="param-type"><a link="LineCallout3D.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineCallout3D" LineCallout3D.html>LineCallout3D</a></span> </code> </td> <td class="name"><code><a id='fromJSON'/> 通过json数据构造一个LineSymbol3DLayer对象</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="LineSymbol3DLayer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineSymbol3DLayer" LineSymbol3DLayer.html>LineSymbol3DLayer</a></span> </code> </td> <td class="name"><code><a id='clone'/> 克隆并返回一个新的LineSymbol3DLayer对象</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><a id='toJSON'/> 导出为json数据</code></td> </tr> </tbody> </table> </div> <h4 style="margin-top: 20px;margin-bottom: 20px;">方法详情</h4> <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> </span> </h4> <div class="description"> <a id='fromJSON'/> 通过json数据构造一个LineSymbol3DLayer对象 </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" id="json"><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> <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>新的LineSymbol3DLayer对象</p></div> <div class='column is-5 has-text-left'> <label>类型: </label> <span class="param-type"><a link="LineCallout3D.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineCallout3D" LineCallout3D.html>LineCallout3D</a></span> </div> </div> </div> </div> </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"> <a id='clone'/> 克隆并返回一个新的LineSymbol3DLayer对象 </div> <dl class="details"> <dt class="tag-overrides">Overrides:</dt> <dd class="tag-overrides"><ul class="dummy"><li> <a class="mapgis-link-name" title="Symbol3DLayer#clone" Symbol3DLayer.html#clone>Symbol3DLayer#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>新的LineSymbol3DLayer对象</p></div> <div class='column is-5 has-text-left'> <label>类型: </label> <span class="param-type"><a link="LineSymbol3DLayer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="LineSymbol3DLayer" LineSymbol3DLayer.html>LineSymbol3DLayer</a></span> </div> </div> </div> </div> </div> <div class="member"> <h4 class="name" id="toJSON"> <a class="href-link" href="#toJSON">#</a> <span class="code-name" id="toJSON" style="font-size:30px"> toJSON<span class="signature">()</span> </span> </h4> <div class="description"> <a id='toJSON'/> 导出为json数据 </div> <dl class="details"> <dt class="tag-overrides">Overrides:</dt> <dd class="tag-overrides"><ul class="dummy"><li> <a class="mapgis-link-name" title="Symbol3DLayer#toJSON" Symbol3DLayer.html#toJSON>Symbol3DLayer#toJSON</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>导出的json数据</p></div> <div class='column is-5 has-text-left'> <label>类型: </label> <span class="param-type">Object</span> </div> </div> </div> </div> </div> </div> </div> </article> </section>