UNPKG

@mapgis/webclient-leaflet-plugin

Version:

开发时需要引入MapGIS Client for JavaScript(Leaflet)开发包;其中包括必备的 CSS 文件和 JS 文件;

3,554 lines (1,115 loc) 72.4 kB
<header id="page-title" class="page-title"> <span class="page-title-main">类名</span> <span class="page-title-sub">RandomThemeLayer</span> </header> <section> <article> <div class="container-overview"> <div class='vertical-section'> <div class="members"> <div class="member"> <h4 class="name" id="RandomThemeLayer"> <a class="href-link" href="#RandomThemeLayer">#</a> <span class="code-name" id="RandomThemeLayer" style="font-size:30px"> new RandomThemeLayer<span class="signature">(name, options)</span> </span> </h4> <div class="description"> <p>随机专题图对数据(&lt;<code>zondy.Feature.Vector</code>&gt;)属性字段(attributes)的属性值进行分段,使用不同的颜色或符号(线型、填充)渲染不同范围段的属性值。 随机专题图一般用来反映连续分布现象的数量或程度特征,如降水量的分布,土壤侵蚀强度的分布等。</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>name</code></td> <td class="type"> <span class="param-type"> string </span> </td> <td class="default"> </td> <td class="description last"><p>图层名</p></td> </tr> <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>id</code></td> <td class="type"> <span class="param-type"> string </span> </td> <td class="default"> </td> <td class="description last"><p>专题图层 ID。默认使用 CommonUtil.createUniqueID(&quot;themeLayer_&quot;) 创建专题图层 ID。</p></td> </tr> <tr class="deep-level-1"> <td class="name"><code>opacity</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"><code>nodesClipPixel</code></td> <td class="type"> <span class="param-type"> number </span> </td> <td class="default"> 2 </td> <td class="description last"><p>节点抽稀像素距离。</p></td> </tr> <tr class="deep-level-1"> <td class="name"><code>isHoverAble</code></td> <td class="type"> <span class="param-type"> boolean </span> </td> <td class="default"> false </td> <td class="description last"><p>图形是否在 hover 时高亮。</p></td> </tr> <tr class="deep-level-1"> <td class="name"><code>isMultiHover</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-1"> <td class="name"><code>isClickAble</code></td> <td class="type"> <span class="param-type"> boolean </span> </td> <td class="default"> true </td> <td class="description last"><p>图形是否可点击。</p></td> </tr> <tr class="deep-level-1"> <td class="name"><code>isAllowFeatureStyle</code></td> <td class="type"> <span class="param-type"> boolean </span> </td> <td class="default"> false </td> <td class="description last"><p>是否允许 feature 样式(style) 中的有效属性应用到专题图层。禁止对专题要素使用数据(feature)的 style。此属性可强制将数据 feature 的 style 中有效属性应用到专题要素上,且拥有比图层 style 和 styleGroups 更高的优先级,使专题要素的样式脱离专题图层的控制。可以通过此方式实现对特殊数据(feature) 对应专题要素赋予独立 style。</p></td> </tr> </tbody> </table> </div> <dl class="details"> </dl> </div> </div> </div> </div> <h3 class="subsection-title">继承关系</h3> <ul> <li><a link="zondy.themelayer.GeoFeatureThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.GeoFeatureThemeLayer.html">zondy.themelayer.GeoFeatureThemeLayer</a></li> </ul> <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="#addFeatures">addFeatures</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="#clear">clear</a></code></td> <td class="name"> <code> </code> </td> <td class="name"><code><p>清除的内容包括数据(features) 、专题要素、缓存。</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#clearCache">clearCache</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="#createThematicFeature">createThematicFeature</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="#destroyFeatures">destroyFeatures</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="#getCacheCount">getCacheCount</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="#getColor">getColor</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="#getEvents">getEvents</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="#getFeatureBy">getFeatureBy</a></code></td> <td class="name"> <code> </code> </td> <td class="name"><code><p>在专题图的要素数组 features 里面遍历每一个 feature,当 feature[property] === value 时,返回此 feature(并且只返回第一个)。</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#getFeatureById">getFeatureById</a></code></td> <td class="name"> <code> </code> </td> <td class="name"><code><p>通过给定一个 ID,返回对应的矢量要素,如果不存在则返回 null。</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#getFeatures">getFeatures</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="#getFeaturesByAttribute">getFeaturesByAttribute</a></code></td> <td class="name"> <code> <span class="param-type"> Array </span> </code> </td> <td class="name"><code><p>通过给定一个属性的 key 值和 value 值,返回所有匹配的要素数组。</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#getLocalXY">getLocalXY</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="#getShapesByFeatureID">getShapesByFeatureID</a></code></td> <td class="name"> <code> </code> </td> <td class="name"><code><p>通过 FeatureID 获取 feature 关联的所有图形。如果不传入此参数,函数将返回所有图形。</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#getStyleByData">getStyleByData</a></code></td> <td class="name"> <code> <span class="param-type"> Array.&lt;<a onclick="getTypeHTML(event)" link="zondy.themelayer.ThemeStyle.html">zondy.themelayer.ThemeStyle</a>> </span> </code> </td> <td class="name"><code></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#initialize">initialize</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="#off">off</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="#on">on</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="#onAdd">onAdd</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="#onRemove">onRemove</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="#redraw">redraw</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="#redrawThematicFeatures">redrawThematicFeatures</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="#removeAllFeatures">removeAllFeatures</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="#removeFeatures">removeFeatures</a></code></td> <td class="name"> <code> </code> </td> <td class="name"><code><p>从专题图中删除 feature。这个函数删除所有传递进来的矢量要素。参数中的 features 数组中的每一项,必须是已经添加到当前图层中的 feature。</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#setMaxCacheCount">setMaxCacheCount</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="#setOpacity">setOpacity</a></code></td> <td class="name"> <code> </code> </td> <td class="name"><code><p>设置图层的不透明度,取值 [0-1] 之间。</p></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#update">update</a></code></td> <td class="name"> <code> </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="member"> <h4 class="name" id="addFeatures"> <a class="href-link" href="#addFeatures">#</a> <span class="code-name" id="addFeatures" style="font-size:30px"> addFeatures<span class="signature">(features)</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>features</code></td> <td class="type"> <span class="param-type"> Object </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="addFeatures" link="zondy.themelayer.GeoFeatureThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.GeoFeatureThemeLayer.html#addFeatures">zondy.themelayer.GeoFeatureThemeLayer#addFeatures</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="clear"> <a class="href-link" href="#clear">#</a> <span class="code-name" id="clear" style="font-size:30px"> clear<span class="signature">()</span> </span> </h4> <div class="description"> <p>清除的内容包括数据(features) 、专题要素、缓存。</p> </div> <dl class="details"> <dt class="inherited-from">Inherited From:</dt> <dd class="inherited-from"><ul class="dummy"><li> <a goto="clear" link="zondy.themelayer.GeoFeatureThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.GeoFeatureThemeLayer.html#clear">zondy.themelayer.GeoFeatureThemeLayer#clear</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="clearCache"> <a class="href-link" href="#clearCache">#</a> <span class="code-name" id="clearCache" style="font-size:30px"> clearCache<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="clearCache" link="zondy.themelayer.GeoFeatureThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.GeoFeatureThemeLayer.html#clearCache">zondy.themelayer.GeoFeatureThemeLayer#clearCache</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="createThematicFeature"> <a class="href-link" href="#createThematicFeature">#</a> <span class="code-name" id="createThematicFeature" style="font-size:30px"> createThematicFeature<span class="signature">(feature)</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>feature</code></td> <td class="type"> <span class="param-type"> Object </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="createThematicFeature" link="zondy.themelayer.GeoFeatureThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.GeoFeatureThemeLayer.html#createThematicFeature">zondy.themelayer.GeoFeatureThemeLayer#createThematicFeature</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="destroyFeatures"> <a class="href-link" href="#destroyFeatures">#</a> <span class="code-name" id="destroyFeatures" style="font-size:30px"> destroyFeatures<span class="signature">(features)</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>features</code></td> <td class="type"> <span class="param-type"> Array.&lt;zondy.Feature.Vector> </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="destroyFeatures" link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html#destroyFeatures">zondy.themelayer.ThemeLayer#destroyFeatures</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="getCacheCount"> <a class="href-link" href="#getCacheCount">#</a> <span class="code-name" id="getCacheCount" style="font-size:30px"> getCacheCount<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="getCacheCount" link="zondy.themelayer.GeoFeatureThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.GeoFeatureThemeLayer.html#getCacheCount">zondy.themelayer.GeoFeatureThemeLayer#getCacheCount</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"> number </span> </div> </div> </div> </div> </div> <div class="member"> <h4 class="name" id="getColor"> <a class="href-link" href="#getColor">#</a> <span class="code-name" id="getColor" style="font-size:30px"> getColor<span class="signature">()</span> </span> </h4> <div class="description"> <p>获取随机颜色</p> </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>color</p></div> <div class='column is-5 has-text-left'> <label>类型: </label> <span class="param-type"> Array </span> </div> </div> </div> </div> </div> <div class="member"> <h4 class="name" id="getEvents"> <a class="href-link" href="#getEvents">#</a> <span class="code-name" id="getEvents" style="font-size:30px"> getEvents<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="getEvents" link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html#getEvents">zondy.themelayer.ThemeLayer#getEvents</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="getFeatureBy"> <a class="href-link" href="#getFeatureBy">#</a> <span class="code-name" id="getFeatureBy" style="font-size:30px"> getFeatureBy<span class="signature">(property, value)</span> </span> </h4> <div class="description"> <p>在专题图的要素数组 features 里面遍历每一个 feature,当 feature[property] === value 时,返回此 feature(并且只返回第一个)。</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>property</code></td> <td class="type"> <span class="param-type"> string </span> </td> <td class="description last"><p>要的某个属性名。</p></td> </tr> <tr class="deep-level-0"> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type"> string </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="getFeatureBy" link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html#getFeatureBy">zondy.themelayer.ThemeLayer#getFeatureBy</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="getFeatureById"> <a class="href-link" href="#getFeatureById">#</a> <span class="code-name" id="getFeatureById" style="font-size:30px"> getFeatureById<span class="signature">(featureId)</span> </span> </h4> <div class="description"> <p>通过给定一个 ID,返回对应的矢量要素,如果不存在则返回 null。</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>featureId</code></td> <td class="type"> <span class="param-type"> number </span> </td> <td class="description last"><p>要素 ID。</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="getFeatureById" link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html#getFeatureById">zondy.themelayer.ThemeLayer#getFeatureById</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="getFeatures"> <a class="href-link" href="#getFeatures">#</a> <span class="code-name" id="getFeatures" style="font-size:30px"> getFeatures<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="getFeatures" link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html#getFeatures">zondy.themelayer.ThemeLayer#getFeatures</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 </span> </div> </div> </div> </div> </div> <div class="member"> <h4 class="name" id="getFeaturesByAttribute"> <a class="href-link" href="#getFeaturesByAttribute">#</a> <span class="code-name" id="getFeaturesByAttribute" style="font-size:30px"> getFeaturesByAttribute<span class="signature">(attrName, attrValue)</span> </span> </h4> <div class="description"> <p>通过给定一个属性的 key 值和 value 值,返回所有匹配的要素数组。</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>attrName</code></td> <td class="type"> <span class="param-type"> string </span> </td> <td class="description last"><p>key 值。</p></td> </tr> <tr class="deep-level-0"> <td class="name"><code>attrValue</code></td> <td class="type"> <span class="param-type"> string </span> </td> <td class="description last"><p>value 值。</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="getFeaturesByAttribute" link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html#getFeaturesByAttribute">zondy.themelayer.ThemeLayer#getFeaturesByAttribute</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 </span> </div> </div> </div> </div> </div> <div class="member"> <h4 class="name" id="getLocalXY"> <a class="href-link" href="#getLocalXY">#</a> <span class="code-name" id="getLocalXY" style="font-size:30px"> getLocalXY<span class="signature">(coordinate)</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>coordinate</code></td> <td class="type"> <span class="param-type"> Array </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="getLocalXY" link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html#getLocalXY">zondy.themelayer.ThemeLayer#getLocalXY</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="getShapesByFeatureID"> <a class="href-link" href="#getShapesByFeatureID">#</a> <span class="code-name" id="getShapesByFeatureID" style="font-size:30px"> getShapesByFeatureID<span class="signature">(featureID)</span> </span> </h4> <div class="description"> <p>通过 FeatureID 获取 feature 关联的所有图形。如果不传入此参数,函数将返回所有图形。</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>featureID</code></td> <td class="type"> <span class="param-type"> number </span> </td> <td class="description last"><p>要素 ID。</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="getShapesByFeatureID" link="zondy.themelayer.GeoFeatureThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.GeoFeatureThemeLayer.html#getShapesByFeatureID">zondy.themelayer.GeoFeatureThemeLayer#getShapesByFeatureID</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="getStyleByData"> <a class="href-link" href="#getStyleByData">#</a> <span class="code-name" id="getStyleByData" style="font-size:30px"> getStyleByData<span class="signature">()</span> </span> </h4> <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>专题要素的 Style</p></div> <div class='column is-5 has-text-left'> <label>类型: </label> <span class="param-type"> Array.&lt;<a onclick="getTypeHTML(event)" link="zondy.themelayer.ThemeStyle.html">zondy.themelayer.ThemeStyle</a>> </span> </div> </div> </div> </div> </div> <div class="member"> <h4 class="name" id="initialize"> <a class="href-link" href="#initialize">#</a> <span class="code-name" id="initialize" style="font-size:30px"> initialize<span class="signature">(name, options)</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>name</code></td> <td class="type"> <span class="param-type"> string </span> </td> <td class="description last"><p>专题图名。</p></td> </tr> <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> </tbody> </table> </div> <dl class="details"> <dt class="tag-overrides">Overrides:</dt> <dd class="tag-overrides"><ul class="dummy"><li> <a href="zondy.themelayer.GeoFeatureThemeLayer.html#initialize">zondy.themelayer.GeoFeatureThemeLayer#initialize</a> </li></ul></dd> </dl> </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">(event, callback, context)</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>event</code></td> <td class="type"> <span class="param-type"> Event </span> </td> <td class="description last"><p>监听事件。</p></td> </tr> <tr class="deep-level-0"> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type"> function </span> </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"> string </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="off" link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html#off">zondy.themelayer.ThemeLayer#off</a> </li></ul></dd> </dl> </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">(event, callback, context)</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>event</code></td> <td class="type"> <span class="param-type"> Event </span> </td> <td class="description last"><p>监听事件。</p></td> </tr> <tr class="deep-level-0"> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type"> function </span> </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"> string </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="on" link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html#on">zondy.themelayer.ThemeLayer#on</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="onAdd"> <a class="href-link" href="#onAdd">#</a> <span class="code-name" id="onAdd" style="font-size:30px"> onAdd<span class="signature">(map)</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"