UNPKG

@mapgis/webclient-common

Version:

mapgis ES6 format for igserver

1,491 lines (519 loc) 22.6 kB
<header id="page-title" class="page-title"> <span class="page-title-main">类名</span> <span class="page-title-sub">SimpleFillSymbol</span> </header> <section> <article> <div class="container-overview"> <div class='vertical-section'> <div class="members"> <div class="member"> <h4 class="name" id="SimpleFillSymbol"> <a class="href-link" href="#SimpleFillSymbol">#</a> <span class="code-name" id="SimpleFillSymbol" style="font-size:30px"> new SimpleFillSymbol<span class="signature">(options)</span> </span> </h4> <div class="description"> <p>简单填充符号,参考示例:<a href='#new-SimpleFillSymbol'>[填充符号样式]</a> <br><br>[ES5引入方式]:<br/> zondy.symbol.SimpleFillSymbol() <br/> [ES6引入方式]:<br/> import { SimpleFillSymbol } from &quot;@mapgis/webclient-common&quot; <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>color</code></td> <td class="type"> <span class="param-type"> <a link="Color.html" onclick="getTypeHTML(event)" href="Color.html">Color</a> </span> | <span class="param-type"> String </span> </td> <td class="default"> new Color(255, 255, 255, 0.25) </td> <td class="description last"><p>填充颜色</p></td> </tr> <tr class="deep-level-1"> <td class="name"><code>outline</code></td> <td class="type"> <span class="param-type"> <a link="SimpleLineSymbol.html" onclick="getTypeHTML(event)" href="SimpleLineSymbol.html">SimpleLineSymbol</a> </span> </td> <td class="default"> new SimpleLineSymbol() </td> <td class="description last"><p>外边线样式</p></td> </tr> <tr class="deep-level-1"> <td class="name"><code>style</code></td> <td class="type"> <span class="param-type"> String </span> </td> <td class="default"> 'solid' </td> <td class="description last"><p>填充样式,默认&quot;solid&quot;,可选&quot;backward-diagonal&quot;|&quot;cross&quot;|&quot;diagonal-cross&quot;|&quot;forward-diagonal&quot;|&quot;horizontal&quot;|&quot;none&quot;|&quot;solid&quot;|&quot;vertical&quot;</p></td> </tr> </tbody> </table> </div> <dl class="details"> </dl> <p class="summary"><h5>支持如下方法:</h5> <a href="Symbol.html#clone"><code>1、克隆并返回新的符号对象</code></a> <br/> <a href="Symbol.html#toJSON"><code>2、导出一个JSON对像</code></a> <br/> <a href='#fromJSON'>[3、通过json构造并返回一个新的SimpleFillSymbol对象]</a></p> <h5>示例</h5> <p class="code-caption"><h7 id='new-SimpleFillSymbol'>填充符号样式</h7></p> <pre class="prettyprint"><code>// ES5引入方式 const { SimpleFillSymbol } = zondy.symbol const { Color } = zondy // ES6引入方式 import { SimpleFillSymbol, Color } from "@mapgis/webclient-common" const simpleFillSymbol = new SimpleFillSymbol({ // 填充颜色 color: new Color(255, 0, 0, 1), // 填充样式 style: "solid", // 外边线样式 outline: new SimpleLineSymbol({ // 外边线颜色 color: new Color(255, 0, 0, 1), // 外边线宽度 width: 2 }) })</code></pre> </div> </div> </div> </div> <h3 class="subsection-title">继承关系</h3> <ul> <li><a link="FillSymbol.html" onclick="getTypeHTML(event)" href="FillSymbol.html">FillSymbol</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="#color">color</a></code></td> <td class="name"> <code> <span class="param-type"> <a link="Color.html" onclick="getTypeHTML(event)" href="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="#extensionOptions">extensionOptions</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="#id">id</a></code></td> <td class="name"> <code> <span class="param-type"> String </span> </code> </td> <td class="name"><code><p>符号id</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#outline">outline</a></code></td> <td class="name"> <code> <span class="param-type"> <a link="SimpleLineSymbol.html" onclick="getTypeHTML(event)" href="SimpleLineSymbol.html">SimpleLineSymbol</a> </span> </code> </td> <td class="name"><code><p>外边线样式类型</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#style">style</a></code></td> <td class="name"> <code> <span class="param-type"> String </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"> String </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="Color.html" onclick="getTypeHTML(event)" href="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)" href="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="extensionOptions"> <a class="href-link" href="#extensionOptions">#</a> <span class="code-name"> extensionOptions </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="extensionOptions" link="Symbol.html" onclick="getTypeHTML(event)" href="Symbol.html#extensionOptions">Symbol#extensionOptions</a> </li></ul></dd> <dt class="tag-default">Default Value:</dt> <dd class="tag-default"><ul class="dummy"> <li>{}</li> </ul></dd> </dl> </div> <div class="member"> <span class="method-parameter is-pulled-right"> <label>类型:</label> <span class="param-type"> String </span> </span> <h4 class="name" id="id"> <a class="href-link" href="#id">#</a> <span class='tag'>readonly</span> <span class="code-name"> id </span> </h4> <div class="description"> <p>符号id</p> </div> <dl class="details"> <dt class="inherited-from">Inherited From:</dt> <dd class="inherited-from"><ul class="dummy"><li> <a goto="id" link="Symbol.html" onclick="getTypeHTML(event)" href="Symbol.html#id">Symbol#id</a> </li></ul></dd> </dl> </div> <div class="member"> <span class="method-parameter is-pulled-right"> <label>类型:</label> <span class="param-type"> <a link="SimpleLineSymbol.html" onclick="getTypeHTML(event)" href="SimpleLineSymbol.html">SimpleLineSymbol</a> </span> </span> <h4 class="name" id="outline"> <a class="href-link" href="#outline">#</a> <span class="code-name"> outline </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="outline" link="FillSymbol.html" onclick="getTypeHTML(event)" href="FillSymbol.html#outline">FillSymbol#outline</a> </li></ul></dd> </dl> </div> <div class="member"> <span class="method-parameter is-pulled-right"> <label>类型:</label> <span class="param-type"> String </span> </span> <h4 class="name" id="style"> <a class="href-link" href="#style">#</a> <span class="code-name"> style </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"> String </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 href="FillSymbol.html#type">FillSymbol#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="SimpleFillSymbol.html" onclick="getTypeHTML(event)" href="SimpleFillSymbol.html">SimpleFillSymbol</a> </span> </code> </td> <td class="name"><code><p>通过json构造并返回一个新的SimpleFillSymbol对象</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="SimpleFillSymbol.html" onclick="getTypeHTML(event)" href="SimpleFillSymbol.html">SimpleFillSymbol</a> </span> </code> </td> <td class="name"><code><p>克隆并返回新的符号对象</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>导出为JSON对象</p></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"> <p>通过json构造并返回一个新的SimpleFillSymbol对象<a id='fromJSON'></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>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>新的SimpleFillSymbol对象</p></div> <div class='column is-5 has-text-left'> <label>类型: </label> <span class="param-type"> <a link="SimpleFillSymbol.html" onclick="getTypeHTML(event)" href="SimpleFillSymbol.html">SimpleFillSymbol</a> </span> </div> </div> </div> </div> <h5>示例</h5> <pre class="prettyprint"><code>&lt;caption>&lt;h7>通过json构造并返回一个新的SimpleFillSymbol对象&lt;/h7>&lt;/caption></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 href="FillSymbol.html#clone">FillSymbol#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="SimpleFillSymbol.html" onclick="getTypeHTML(event)" href="SimpleFillSymbol.html">SimpleFillSymbol</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"> <p>导出为JSON对象</p> </div> <dl class="details"> <dt class="tag-overrides">Overrides:</dt> <dd class="tag-overrides"><ul class="dummy"><li> <a href="FillSymbol.html#toJSON">FillSymbol#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>