UNPKG

@mapgis/webclient-leaflet-plugin

Version:

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

3,877 lines (1,169 loc) 63.8 kB
<header id="page-title" class="page-title"> <span class="page-title-main">类名</span> <span class="page-title-sub">GeoFeatureThemeLayer</span> </header> <section> <article> <div class="container-overview"> <div class='vertical-section'> <div class="members"> <div class="member"> <h4 class="name" id="GeoFeatureThemeLayer"> <a class="href-link" href="#GeoFeatureThemeLayer">#</a> <span class="code-name" id="GeoFeatureThemeLayer" style="font-size:30px"> new GeoFeatureThemeLayer<span class="signature">(name, options)</span> </span> </h4> <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 class="method-parameter columns"> <div class="column is-2"><label>绑定事件</label></div> <div class="column is-10"> <ul> <li><a href="#beforefeaturesadded">beforefeaturesadded</a></li> </ul> </div> </div> </div> </div> </div> </div> <h3 class="subsection-title">继承关系</h3> <ul> <li><a link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html">zondy.themelayer.ThemeLayer</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="#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="#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="#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="tag-overrides">Overrides:</dt> <dd class="tag-overrides"><ul class="dummy"><li> <a href="zondy.themelayer.ThemeLayer.html#addFeatures">zondy.themelayer.ThemeLayer#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"> </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"> </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"> </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"> </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="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"> </dl> </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"> </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="onRemove"> <a class="href-link" href="#onRemove">#</a> <span class="code-name" id="onRemove" style="font-size:30px"> onRemove<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">描述</th> </tr> </thead> <tbody> <tr class="deep-level-0"> <td class="name"><code>map</code></td> <td class="type"> <span class="param-type"> L.Map </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="onRemove" link="zondy.themelayer.ThemeLayer.html" onclick="getTypeHTML(event)" href="zondy.themelayer.ThemeLayer.html#onRemove">zondy.themelayer.ThemeLayer#onRemove</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="redraw"> <a class="href-link" href="#redraw">#</a> <span class="code-name" id="redraw" style="font-size:30px"> redraw<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="zondy.themelayer.ThemeLayer.html#redraw">zondy.themelayer.ThemeLayer#redraw</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="redrawThematicFeatures"> <a class="href-link" href="#redrawThematicFeatures">#</a> <span class="code-name" id="redrawThematicFeatures" style="font-size:30px"> redrawThematicFeatures<span class="signature">(bounds)</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>bounds</code></td> <td class="type"> <span class="param-type"> L.bounds </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.ThemeLayer.html#redrawThematicFeatures">zondy.themelayer.ThemeLayer#redrawThematicFeatures</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="removeAllFeatures"> <a class="href-link" href="#removeAllFeatures">#</a> <span class="code-name" id="removeAllFeatures" style="font-size:30px"> removeAllFeatures<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="zondy.themelayer.ThemeLayer.html#removeAllFeatures">zondy.themelayer.ThemeLayer#removeAllFeatures</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="removeFeatures"> <a class="href-link" href="#removeFeatures">#</a> <span class="code-name" id="removeFeatures" style="font-size:30px"> removeFeatures<span class="signature">(features)</span> </span> </h4> <div class="description"> <p>从专题图中删除 feature。这个函数删除所有传递进来的矢量要素。参数中的 features 数组中的每一项,必须是已经添加到当前图层中的 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>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="tag-overrides">Overrides:</dt> <dd class="tag-overrides"><ul class="dummy"><li> <a href="zondy.themelayer.ThemeLayer.html#removeFeatures">zondy.themelayer.ThemeLayer#removeFeatures</a> </li></ul></dd> </dl> </div> <div class="member"> <h4 class="name" id="setMaxCacheCount"> <a class="href-link" href="#setMaxCacheCount">#</a> <span class="code-name" id="setMaxCacheCount" style="font-size:30px"> setMaxCacheCount<span class="signature">(cacheCount)</span> </span> </h4> <div class="description"> <p>设置最大缓存数量。</p> </div> <h4>参数</h4> <div class="table-container"> <table class="params table"> <thead> <t