UNPKG

@mapgis/webclient-common

Version:

mapgis ES6 format for igserver

5,711 lines 80.8 kB
<header id="page-title" class="page-title">
    
        <span class="page-title-main">类名</span>
        <span class="page-title-sub">Map</span>
    
</header>





<section>

<article>
    <div class="container-overview">
    
        
            <div class='vertical-section'>
                <div class="members">
                    <div class="member">
                        


    
    <h4 class="name" id="Map">
        <a class="href-link" href="#Map">#</a>
        
        <span class="code-name" id="Map" style="font-size:30px">
            
                new Map<span class="signature">(options)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>图层管理容器,和地图引擎无关,通过此对象而不是地图引擎来对图层进行管理
<br>[ES5引入方式]:<br/>
zondy.Map() <br/>
[ES6引入方式]:<br/>
import { Map } from &quot;@mapgis/webclient-common&quot; <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>options</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             Object
    
</span>



  
  </td>

  

  <td class="description last"><p>构造参数</p></td>
</tr>


  
    
<tr class="deep-level-1">
  
      <td class="name"><code>basemap</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             <a link="Basemap.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Basemap" Basemap.html>Basemap</a>
    
</span>



  
  </td>

  

  <td class="description last"><p>设置地图中的底图;<br/></p></td>
</tr>


  
    
<tr class="deep-level-1">
  
      <td class="name"><code>layers</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
         Array.&lt;<a onclick="getTypeHTML(event)" link="Layer.html">Layer</a>>
    
</span>



  
  </td>

  

  <td class="description last"><p>设置地图中的图层数组;<br/>
1、如果底图存在,则会使用底图上的参考系作为地图视图的参考系,如果没有,则使用常规图层上的坐标系;<br/>
2、底图图层在常规图层的最下面;
3、除GraphicsLayer外的二维地图都可以作为底图<br/></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="#添加图层事件">添加图层事件</a></li>
            
                <li><a href="#添加多个图层事件">添加多个图层事件</a></li>
            
                <li><a href="#删除图层事件">删除图层事件</a></li>
            
                <li><a href="#移除多个图层事件">移除多个图层事件</a></li>
            
                <li><a href="#移除所有图层事件">移除所有图层事件</a></li>
            </ul>
        </div>
    </div>

















<p class="summary"><h5>支持如下方法:</h5>
<a href='#add'>[1、添加图层对象]</a><br/>
<a href='#addMany'>[2、添加多个图层]</a><br/>
<a href='#findLayerById'>[3、根据id查询图层]</a><br/>
<a href='#remove'>[4、删除指定图层]</a><br/>
<a href='#removeMany'>[5、移除多个图层]</a><br/>
<a href='#removeAll'>[6、删除所有图层]</a><br/>
<a href='#reorder'>[7、调整图层顺序]</a><br/>
<a href='#destroy'>[8、销毁Map对象]</a><br/>
<a href='#fromJSON'>[9、通过json对象构造并返回一个新的Map对象]</a><br/>
<a href='#toJSON'>[10、转换为json对象]</a><br/>
<a href='#clone'>[11、克隆并返回一个新的Map对象]</a><br/></p>



    <h5>示例</h5>
    
        <p class="code-caption"><h7 id='valueExpression'>初始化Map对象</h7></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Map } = zondy
// ES6引入方式
import { Map } from "@mapgis/webclient-common"
//创建Map对象
let map = new Map();</code></pre>
    

        <p class="code-caption"><h7 id='valueExpression'>添加底图图层</h7></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Map, Basemap, Collection } = zondy
const { IGSTileLayer } = zondy.layer
// ES6引入方式
import { Map, Basemap, Collection, IGSTileLayer } from "@mapgis/webclient-common"
//创建Map对象
const map = new Map({
  // 初始化底图图层集合
  basemap: new Basemap({
    // 可以设置多个图层到底图集合中
    baseLayers: new Collection(
      [
        // 创建一个图层
        new IGSTileLayer({
          url: '服务及地址'
        })
      ]
    )
  })
});</code></pre>
    



                    </div>
                </div>
            </div>
        
    
    </div>
    
    
        <h3 class="subsection-title">继承关系</h3>

        


    <ul>
        <li><a link="Evented.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Evented" Evented.html>Evented</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="#allLayers">allLayers</a></code></td>
                                <td class="name">
                                    <code>
                                        
<span class="param-type">
    
         <a onclick="getTypeHTML(event)" link="Collection.html">Collection</a>.&lt;<a onclick="getTypeHTML(event)" link="Layer.html">Layer</a>>
    
</span>



                                    </code>
                                </td>
                                <td class="name"><code><p>子图层扁平后容器</p></code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#basemap">basemap</a></code></td>
                                <td class="name">
                                    <code>
                                        
<span class="param-type">
    
             <a link="Collection.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Collection" Collection.html>Collection</a>
    
</span>



                                    </code>
                                </td>
                                <td class="name"><code><p>基础地图</p></code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#fullExtent">fullExtent</a></code></td>
                                <td class="name">
                                    <code>
                                        
<span class="param-type">
    
             <a link="Extent.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Extent" Extent.html>Extent</a>
    
</span>



                                    </code>
                                </td>
                                <td class="name"><code><p>地图范围</p></code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#layers">layers</a></code></td>
                                <td class="name">
                                    <code>
                                        
<span class="param-type">
    
         <a onclick="getTypeHTML(event)" link="Collection.html">Collection</a>.&lt;<a onclick="getTypeHTML(event)" link="Layer.html">Layer</a>>
    
</span>



                                    </code>
                                </td>
                                <td class="name"><code><p>子图层数组</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>
                        
                    </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 onclick="getTypeHTML(event)" link="Collection.html">Collection</a>.&lt;<a onclick="getTypeHTML(event)" link="Layer.html">Layer</a>>
    
</span>



    </span>

<h4 class="name" id="allLayers">
    <a class="href-link" href="#allLayers">#</a>
    
        
            <span class='tag'>readonly</span>
        
    
    <span class="code-name">
        allLayers
    </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="Collection.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Collection" Collection.html>Collection</a>
    
</span>



    </span>

<h4 class="name" id="basemap">
    <a class="href-link" href="#basemap">#</a>
    
    <span class="code-name">
        basemap
    </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="Extent.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Extent" Extent.html>Extent</a>
    
</span>



    </span>

<h4 class="name" id="fullExtent">
    <a class="href-link" href="#fullExtent">#</a>
    
        
            <span class='tag'>readonly</span>
        
    
    <span class="code-name">
        fullExtent
    </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 onclick="getTypeHTML(event)" link="Collection.html">Collection</a>.&lt;<a onclick="getTypeHTML(event)" link="Layer.html">Layer</a>>
    
</span>



    </span>

<h4 class="name" id="layers">
    <a class="href-link" href="#layers">#</a>
    
    <span class="code-name">
        layers
    </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="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='tag'>readonly</span>
        
    
    <span class="code-name">
        spatialReference
    </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="#fromJSON">fromJSON</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                                
<span class="param-type">
    
             <a link="Map.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Map" Map.html>Map</a>
    
</span>



                                            
                                    </code>
                                </td>
                                <td class="name"><code><p>通过json对象构造并返回一个新的Map对象</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#add">add</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                    </code>
                                </td>
                                <td class="name"><code><p>添加图层对象</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#addMany">addMany</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                    </code>
                                </td>
                                <td class="name"><code><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="Map.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Map" Map.html>Map</a>
    
</span>



                                            
                                    </code>
                                </td>
                                <td class="name"><code><p>克隆并返回一个新的Map对象</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#destroy">destroy</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                    </code>
                                </td>
                                <td class="name"><code><p>销毁Map对象</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#dispatchEvent">dispatchEvent</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                                
<span class="param-type">
    
             *
    
</span>



                                            
                                    </code>
                                </td>
                                <td class="name"><code></code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#findLayerById">findLayerById</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                                
                                            
                                    </code>
                                </td>
                                <td class="name"><code><p>根据id查询图层</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#getFullExtent">getFullExtent</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                                
<span class="param-type">
    
             <a link="Extent.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Extent" Extent.html>Extent</a>
    
</span>



                                            
                                    </code>
                                </td>
                                <td class="name"><code></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="#remove">remove</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                    </code>
                                </td>
                                <td class="name"><code><p>删除指定图层,需要传入一个图层对象</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#removeAll">removeAll</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                    </code>
                                </td>
                                <td class="name"><code><p>删除所有图层</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#removeMany">removeMany</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                    </code>
                                </td>
                                <td class="name"><code><p>移除多个图层</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a href="#reorder">reorder</a></code></td>
                                <td class="name">
                                    <code>
                                        
                                    </code>
                                </td>
                                <td class="name"><code><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对象</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对象构造并返回一个新的Map对象<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>一个新的Map对象</p></div>
    
    
    <div class='column is-5 has-text-left'>
        <label>类型: </label>
        
<span class="param-type">
    
             <a link="Map.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Map" Map.html>Map</a>
    
</span>



    </div>
    
</div>

                
        </div>
    </div>






</div>
            
                <div class="member">


    
    <h4 class="name" id="add">
        <a class="href-link" href="#add">#</a>
        
        <span class="code-name" id="add" style="font-size:30px">
            
                add<span class="signature">(layer, index)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>添加图层对象<a id='add'></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>layer</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             Object
    
</span>
|

<span class="param-type">
    
             <a link="Layer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Layer" Layer.html>Layer</a>
    
</span>



  
  </td>

  

  <td class="description last"><p>要添加的图层对象</p></td>
</tr>



        

            
<tr class="deep-level-0">
  
      <td class="name"><code>index</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             Number
    
</span>



  
  </td>

  

  <td class="description last"><p>图层列表内下标,默认undefined</p></td>
</tr>



        
        </tbody>
    </table>
</div>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
    
        <pre class="prettyprint"><code>//添加图层
map.add(layer);</code></pre>
    


</div>
            
                <div class="member">


    
    <h4 class="name" id="addMany">
        <a class="href-link" href="#addMany">#</a>
        
        <span class="code-name" id="addMany" style="font-size:30px">
            
                addMany<span class="signature">(layers, index)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>添加多个图层<a id='addMany'></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>layers</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
         Array.&lt;(Object|<a onclick="getTypeHTML(event)" link="Layer.html">Layer</a>)>
    
</span>



  
  </td>

  

  <td class="description last"><p>要添加的图层数组]</p></td>
</tr>



        

            
<tr class="deep-level-0">
  
      <td class="name"><code>index</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             Number
    
</span>



  
  </td>

  

  <td class="description last"><p>图层列表内下标,默认undefined</p></td>
</tr>



        
        </tbody>
    </table>
</div>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
    
        <pre class="prettyprint"><code>map.addMany(layers);</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>克隆并返回一个新的Map对象<a id='clone'></a></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>一个新的Map对象</p></div>
    
    
    <div class='column is-5 has-text-left'>
        <label>类型: </label>
        
<span class="param-type">
    
             <a link="Map.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Map" Map.html>Map</a>
    
</span>



    </div>
    
</div>

                
        </div>
    </div>






</div>
            
                <div class="member">


    
    <h4 class="name" id="destroy">
        <a class="href-link" href="#destroy">#</a>
        
        <span class="code-name" id="destroy" style="font-size:30px">
            
                destroy<span class="signature">()</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>销毁Map对象<a id='destroy'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
    
        <pre class="prettyprint"><code>map.destroy()</code></pre>
    


</div>
            
                <div class="member">


    
    <h4 class="name" id="dispatchEvent">
        <a class="href-link" href="#dispatchEvent">#</a>
        
        <span class="code-name" id="dispatchEvent" style="font-size:30px">
            
                dispatchEvent<span class="signature">(type, data, propagate)</span>
            
        </span>
    </h4>
    

    









    <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>type</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             *
    
</span>



  
  </td>

  

  <td class="description last"><p>事件类型</p></td>
</tr>



        

            
<tr class="deep-level-0">
  
      <td class="name"><code>data</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             *
    
</span>



  
  </td>

  

  <td class="description last"><p>事件主体</p></td>
</tr>



        

            
<tr class="deep-level-0">
  
      <td class="name"><code>propagate</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             *
    
</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='column is-5 has-text-left'>
        <label>类型: </label>
        
<span class="param-type">
    
             *
    
</span>



    </div>
    
</div>

                
        </div>
    </div>






</div>
            
                <div class="member">


    
    <h4 class="name" id="findLayerById">
        <a class="href-link" href="#findLayerById">#</a>
        
        <span class="code-name" id="findLayerById" style="font-size:30px">
            
                findLayerById<span class="signature">(id)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>根据id查询图层<a id='findLayerById'></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>id</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             String
    
</span>



  
  </td>

  

  <td class="description last"><p>图层id</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>Object 找到的图层</p></div>
    
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
    
        <pre class="prettyprint"><code>//根据id查询图层
map.findLayerById('图层id');</code></pre>
    


</div>
            
                <div class="member">


    
    <h4 class="name" id="getFullExtent">
        <a class="href-link" href="#getFullExtent">#</a>
        
        <span class="code-name" id="getFullExtent" style="font-size:30px">
            
                getFullExtent<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>地图范围</p></div>
    
    
    <div class='column is-5 has-text-left'>
        <label>类型: </label>
        
<span class="param-type">
    
             <a link="Extent.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Extent" Extent.html>Extent</a>
    
</span>



    </div>
    
</div>

                
        </div>
    </div>






</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/>
当类型为字符串时,可以移除单个或多个事件类型绑定的回调函数,单个事件:&quot;click&quot;,多个事件:以空格分割:&quot;click double-click&quot;;<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">
  
      
<span class="param-type">
    
             function
    
</span>



  
  </td>

  

  <td class="description last"><p>事件回调函数,当types为字符串,且不指定要删除的回调函数时,删除该事件上的所有回调函数</p></td>
</tr>



        

            
<tr class="deep-level-0">
  
      <td class="name"><code>context</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             Object
    
</span>



  
  </td>

  

  <td class="description last"><p>事件回调函数的this关键字将指向的对象</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="Evented.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Evented#off" Evented.html#off>Evented#off</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>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='off1'>移除一个事件的指定回调函数</h5></p>
    
    
        <pre class="prettyprint"><code>// 一个事件的回调函数
const clickFunction = function (event) {
  console.log("点击事件:", event)
}
// 调用MapView或SceneView的off方法移除一个事件的回调函数
view.off('click', clickFunction)</code></pre>
    

        <p class="code-caption"><h5 id='off2'>移除一个事件的所有回调函数</h5></p>
    
    
        <pre class="prettyprint"><code>// 一个事件的回调函数1
const clickFunction1 = function (event) {
  console.log("点击事件1:", event)
}

// 一个事件的回调函数2
const clickFunction2 = function (event) {
  console.log("点击事件2:", event)
}

// 调用MapView或SceneView的off方法移除一个事件的所有回调函数
// 不指定回调函数,则移除该事件上的所有绑定的回调函数
view.off('click')</code></pre>
    

        <p class="code-caption"><h5 id='off3'>移除多个事件的同一个指定的回调函数</h5></p>
    
    
        <pre class="prettyprint"><code>// 多个事件的同一个回调函数
const eventFunction = function (event) {
  console.log("事件:", event)
}
// 调用MapView或SceneView的off方法移除多个事件的同一个指定的回调函数
view.off('click double-click', eventFunction)</code></pre>
    

        <p class="code-caption"><h5 id='off4'>移除多个指定事件的回调函数</h5></p>
    
    
        <pre class="prettyprint"><code>// 一个事件的回调函数
const clickFunction = function (event) {
  console.log("click事件:", event)
}
// 调用MapView或SceneView的off方法移除多个指定事件的回调函数
view.off({
   // 移除click事件上一个指定的函数
  "click": clickFunction,
  // 移除double-click上所有指定的函数
  "double-click": undefined
})</code></pre>
    

        <p class="code-caption"><h5 id='off5'>删除时指定上下文 - types类型为字符串</h5></p>
    
    
        <pre class="prettyprint"><code>// 一个事件的回调函数
const clickFunction = function (event) {
  console.log("点击事件:", event)
}
// 调用MapView或SceneView的off方法移除一个事件的回调函数
view.off('click', clickFunction, view)
// 调用MapView或SceneView的off方法移除一个事件的所有回调函数
view.off('click', undefined, view)</code></pre>
    

        <p class="code-caption"><h5 id='off6'>删除时指定上下文 - types类型为对象</h5></p>
    
    
        <pre class="prettyprint"><code>// 一个事件的回调函数
const clickFunction = function (event) {
  console.log("click事件:", event)
}
// 调用MapView或SceneView的off方法移除多个指定事件的回调函数
view.off({
   // 移除click事件上一个指定的函数
  "click": clickFunction,
  // 移除double-click上所有指定的函数
  "double-click": undefined
}, view)</code></pre>
    


</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">(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='#event1'>[1、注册一个事件]</a><br/>
<a href='#event2'>[2、一次注册多个事件 - 同一个回调函数]</a><br/>
<a href='#event3'>[3、一次注册多个事件 - 分别指回调应函数]</a><br/>
<a href='#event4'>[4、当types为字符串时 - 指定上下文]</a><br/>
<a href='#event5'>[5、当types为对象时 - 指定上下文]</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"><code>types</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             String
    
</span>
|

<span class="param-type">
    
             Object
    
</span>



  
  </td>

  
      <td class="default">
      
          null
      
      </td>
  

  <td class="description last"><p>事件类型<br/>
当types为字符串时,可以定义单个或多个事件,单个事件:&quot;click&quot;,多个事件:以空格分割:&quot;click double-click&quot;;<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">
  
      
<span class="param-type">
    
             function
    
</span>



  
  </td>

  
      <td class="default">
      
          null
      
      </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">
    
             Object
    
</span>



  
  </td>

  
      <td class="default">
      
          null
      
      </td>
  

  <td class="description last"><p>事件回调函数的this关键字将指向的对象</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="Evented.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Evented#on" Evented.html#on>Evented#on</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>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='event1'>注册一个事件</h5></p>
    
    
        <pre class="prettyprint"><code>// 初始化一个点击事件回调函数
const clickFunction = function (event) {
  console.log("点击事件:", event)
}
// 调用MapView或SceneView的on方法注册一个点击事件
view.on('click', clickFunction)</code></pre>
    

        <p class="code-caption"><h5 id='event2'>一次注册多个事件 - 同一个回调函数</h5></p>
    
    
        <pre class="prettyprint"><code>// 初始化一个事件回调函数
const eventFunction = function (event) {
  console.log("事件:", event)
}

// 调用MapView或SceneView的on方法注册多个事件
// 多个事件类型使用同一个回调函数
view.on('click right-click-down', eventFunction)</code></pre>
    

        <p class="code-caption"><h5 id='event3'>一次注册多个事件 - 分别指回调应函数</h5></p>
    
    
        <pre class="prettyprint"><code>// 初始化一个左键点击事件回调函数
const clickFunction = function (event) {
  console.log("click事件:", event)
}

// 初始化一个右键按下事件回调函数
const rightClickFunction = function (event) {
  console.log("right-click-down事件:", event)
}

// 调用MapView或SceneView的on方法注册多个事件
// 每一个事件类型,使用单独的回调函数
// 注意使用此种方式,一种类型的事件仅能指定一个回调函数
view.on({
  "click": clickFunction,
  "right-click-down": rightClickFunction
})</code></pre>
    

        <p class="code-caption"><h5 id='event4'>指定上下文 - types类型为字符串</h5></p>
    
    
        <pre class="prettyprint"><code>// 初始化一个点击事件回调函数
const clickFunction = function (event) {
  console.log("点击事件:", event)
  console.log("上下文对象:", this)
}
// 调用MapView或SceneView的on方法注册一个点击事件
// 指定view为回调函数的上下文对象
view.on('click', clickFunction, view)</code></pre>
    

        <p class="code-caption"><h5 id='event5'>指定上下文 - types类型为对象</h5></p>
    
    
        <pre class="prettyprint"><code>// 初始化一个点击事件回调函数
const clickFunction = function (event) {
  console.log("点击事件:", event)
  console.log("上下文对象:", this)
}
// 调用MapView或SceneView的on方法注册一个点击事件
// 指定view为回调函数的上下文对象
view.on({
  "click": clickFunction,
  "right-click-down": clickFunction
}, view)</code></pre>
    


</div>
            
                <div class="member">


    
    <h4 class="name" id="remove">
        <a class="href-link" href="#remove">#</a>
        
        <span class="code-name" id="remove" style="font-size:30px">
            
                remove<span class="signature">(layer)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>删除指定图层,需要传入一个图层对象<a id='remove'></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>layer</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             Object
    
</span>
|

<span class="param-type">
    
             <a link="Layer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Layer" Layer.html>Layer</a>
    
</span>



  
  </td>

  

  <td class="description last"><p>要删除的图层对象</p></td>
</tr>



        
        </tbody>
    </table>
</div>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
    
        <pre class="prettyprint"><code>//删除指定图层
map.remove(layer);</code></pre>
    


</div>
            
                <div class="member">


    
    <h4 class="name" id="removeAll">
        <a class="href-link" href="#removeAll">#</a>
        
        <span class="code-name" id="removeAll" style="font-size:30px">
            
                removeAll<span class="signature">()</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>删除所有图层<a id='removeAll'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
    
        <pre class="prettyprint"><code>map.removeAll();</code></pre>
    


</div>
            
                <div class="member">


    
    <h4 class="name" id="removeMany">
        <a class="href-link" href="#removeMany">#</a>
        
        <span class="code-name" id="removeMany" style="font-size:30px">
            
                removeMany<span class="signature">(layers)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>移除多个图层<a id='removeMany'></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>layers</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             Array
    
</span>



  
  </td>

  

  <td class="description last"><p>要移除的图层数组</p></td>
</tr>



        
        </tbody>
    </table>
</div>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
    
        <pre class="prettyprint"><code>map.removeMany(layers);</code></pre>
    


</div>
            
                <div class="member">


    
    <h4 class="name" id="reorder">
        <a class="href-link" href="#reorder">#</a>
        
        <span class="code-name" id="reorder" style="font-size:30px">
            
                reorder<span class="signature">(layer, index)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>调整图层顺序<a id='reorder'></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>layer</code></td>
  

  <td class="type">
  
      
<span class="param-type">
    
             <a link="Layer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Layer" Layer.html>Layer</a>
    
</span>



  
  </td>

  

  <td class="description last"><p>要调整顺序的图层</p></td>
</tr>



        

            
<tr class="deep-level-0">
  
      <td class="name"><code>index</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>























    <h5>示例</h5>
    
    
        <pre class="prettyprint"><code>map.reorder(layer, '要移动到的index');</code></pre>
    


</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对象<a id='toJSON'></a></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>导出的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>
    

    

    
        <div class='vertical-section' style='margin-top: 10px'>
            <h3 id='event'>事件</h3>
            <h4 style="margin-top: 20px;margin-bottom: 20px;">事件概述</h4>
            <div class="table-container">
                <table class="params table">
                    <thead>
                    <tr>
                        <th>名称</th>
                        <th>描述</th>
                    </tr>
                    </thead>
                    <tbody>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a  href="#删除图层事件">删除图层事件</a></code></td>
                                <td class="name"><code>删除图层事件</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a  href="#添加图层事件">添加图层事件</a></code></td>
                                <td class="name"><code>添加图层事件</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a  href="#添加多个图层事件">添加多个图层事件</a></code></td>
                                <td class="name"><code>添加多个图层事件</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a  href="#移除多个图层事件">移除多个图层事件</a></code></td>
                                <td class="name"><code>移除多个图层事件</code></td>
                            </tr>
                        
                            <tr class="deep-level-0">
                                <td class="name"><code><a  href="#移除所有图层事件">移除所有图层事件</a></code></td>
                                <td class="name"><code>移除所有图层事件</code></td>
                            </tr>
                        
                    </tbody>
                </table>
            </div>
            <h4 style="margin-top: 20px;margin-bottom: 20px;">事件详情</h4>
            <div class="members">
            
                <div class="member">
                    


    
    <h4 class="name" id="event:%E5%88%A0%E9%99%A4%E5%9B%BE%E5%B1%82%E4%BA%8B%E4%BB%B6">
        <a class="href-link" href="#event:%E5%88%A0%E9%99%A4%E5%9B%BE%E5%B1%82%E4%BA%8B%E4%BB%B6">#</a>
        
        <span class="code-name" id="删除图层事件" style="font-size:30px">
            
                删除图层事件
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>删除图层事件</p>
    </div>
    













    <h5 class="subsection-title">属性:</h5>

    
<div class="table-container">
    <table class="props table">
        <thead>
        <tr>
            
            <th>Name</th>
            

            <th>Type</th>

            
            <th>Attributes</th>
            

            
            <th>Default</th>
            

            <th class="last">Description</th>
        </tr>
        </thead>

        <tbody>
        
            
<tr class="deep-level-0">
    
        <td class="name"><code>event</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             Object
    
</span>



    
    </td>

    
        <td class="attributes">
        

        
        </td>
    

    
        <td class="default">
        
        </td>
    

    <td class="description last"><p>事件对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>type</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             String
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            'layer-remove'
        
        </td>
    

    <td class="description last"><p>删除图层事件</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>layer</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             <a link="Layer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Layer" Layer.html>Layer</a>
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>被删除的图层对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>view</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             View
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>地图视图对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>sourceTarget</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             <a link="Map.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Map" Map.html>Map</a>
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>事件发起对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>target</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             View
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>事件接收对象</p></td>
</tr>

  

        
        </tbody>
    </table>
</div>



<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
        <p class="code-caption"><h5>删除图层事件</h5></p>
    
    
        <pre class="prettyprint"><code>map.on('layer-remove', function (event) {
  // 删除图层事件
  console.log("删除图层事件:", event)
});</code></pre>
    



                </div>
            
                <div class="member">
                    


    
    <h4 class="name" id="event:%E6%B7%BB%E5%8A%A0%E5%9B%BE%E5%B1%82%E4%BA%8B%E4%BB%B6">
        <a class="href-link" href="#event:%E6%B7%BB%E5%8A%A0%E5%9B%BE%E5%B1%82%E4%BA%8B%E4%BB%B6">#</a>
        
        <span class="code-name" id="添加图层事件" style="font-size:30px">
            
                添加图层事件
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>添加图层事件</p>
    </div>
    













    <h5 class="subsection-title">属性:</h5>

    
<div class="table-container">
    <table class="props table">
        <thead>
        <tr>
            
            <th>Name</th>
            

            <th>Type</th>

            
            <th>Attributes</th>
            

            
            <th>Default</th>
            

            <th class="last">Description</th>
        </tr>
        </thead>

        <tbody>
        
            
<tr class="deep-level-0">
    
        <td class="name"><code>event</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             Object
    
</span>



    
    </td>

    
        <td class="attributes">
        

        
        </td>
    

    
        <td class="default">
        
        </td>
    

    <td class="description last"><p>事件对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>type</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             String
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            'layer-add'
        
        </td>
    

    <td class="description last"><p>添加图层事件</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>layer</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             <a link="Layer.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Layer" Layer.html>Layer</a>
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>被添加的图层对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>view</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             View
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>地图视图对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>sourceTarget</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             <a link="Map.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Map" Map.html>Map</a>
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>事件发起对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>target</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             View
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>事件接收对象</p></td>
</tr>

  

        
        </tbody>
    </table>
</div>



<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
        <p class="code-caption"><h5>添加图层事件</h5></p>
    
    
        <pre class="prettyprint"><code>map.on('layer-add', function (event) {
  // 添加图层事件
  console.log("添加图层事件:", event)
});</code></pre>
    



                </div>
            
                <div class="member">
                    


    
    <h4 class="name" id="event:%E6%B7%BB%E5%8A%A0%E5%A4%9A%E4%B8%AA%E5%9B%BE%E5%B1%82%E4%BA%8B%E4%BB%B6">
        <a class="href-link" href="#event:%E6%B7%BB%E5%8A%A0%E5%A4%9A%E4%B8%AA%E5%9B%BE%E5%B1%82%E4%BA%8B%E4%BB%B6">#</a>
        
        <span class="code-name" id="添加多个图层事件" style="font-size:30px">
            
                添加多个图层事件
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>添加多个图层事件</p>
    </div>
    













    <h5 class="subsection-title">属性:</h5>

    
<div class="table-container">
    <table class="props table">
        <thead>
        <tr>
            
            <th>Name</th>
            

            <th>Type</th>

            
            <th>Attributes</th>
            

            
            <th>Default</th>
            

            <th class="last">Description</th>
        </tr>
        </thead>

        <tbody>
        
            
<tr class="deep-level-0">
    
        <td class="name"><code>event</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             Object
    
</span>



    
    </td>

    
        <td class="attributes">
        

        
        </td>
    

    
        <td class="default">
        
        </td>
    

    <td class="description last"><p>事件对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>type</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             String
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            'layer-add-many'
        
        </td>
    

    <td class="description last"><p>添加多个图层事件</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>layers</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
         Array.&lt;<a onclick="getTypeHTML(event)" link="Layer.html">Layer</a>>
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            []
        
        </td>
    

    <td class="description last"><p>被添加的所有图层对象数组</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>view</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             View
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>地图视图对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>sourceTarget</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             <a link="Map.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Map" Map.html>Map</a>
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>事件发起对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>target</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             View
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>事件接收对象</p></td>
</tr>

  

        
        </tbody>
    </table>
</div>



<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
        <p class="code-caption"><h5>添加多个图层事件</h5></p>
    
    
        <pre class="prettyprint"><code>map.on('layer-add-many', function (event) {
  // 添加多个图层事件
  console.log("添加图层事件:", event)
});</code></pre>
    



                </div>
            
                <div class="member">
                    


    
    <h4 class="name" id="event:%E7%A7%BB%E9%99%A4%E5%A4%9A%E4%B8%AA%E5%9B%BE%E5%B1%82%E4%BA%8B%E4%BB%B6">
        <a class="href-link" href="#event:%E7%A7%BB%E9%99%A4%E5%A4%9A%E4%B8%AA%E5%9B%BE%E5%B1%82%E4%BA%8B%E4%BB%B6">#</a>
        
        <span class="code-name" id="移除多个图层事件" style="font-size:30px">
            
                移除多个图层事件
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>移除多个图层事件</p>
    </div>
    













    <h5 class="subsection-title">属性:</h5>

    
<div class="table-container">
    <table class="props table">
        <thead>
        <tr>
            
            <th>Name</th>
            

            <th>Type</th>

            
            <th>Attributes</th>
            

            
            <th>Default</th>
            

            <th class="last">Description</th>
        </tr>
        </thead>

        <tbody>
        
            
<tr class="deep-level-0">
    
        <td class="name"><code>event</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             Object
    
</span>



    
    </td>

    
        <td class="attributes">
        

        
        </td>
    

    
        <td class="default">
        
        </td>
    

    <td class="description last"><p>事件对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>type</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             String
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            'layer-remove-many'
        
        </td>
    

    <td class="description last"><p>移除多个图层事件</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>layers</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
         Array.&lt;<a onclick="getTypeHTML(event)" link="Layer.html">Layer</a>>
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            []
        
        </td>
    

    <td class="description last"><p>被删除的所有图层对象数组</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>view</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             View
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>地图视图对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>sourceTarget</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             <a link="Map.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Map" Map.html>Map</a>
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>事件发起对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>target</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             View
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>事件接收对象</p></td>
</tr>

  

        
        </tbody>
    </table>
</div>



<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
        <p class="code-caption"><h5>移除多个图层事件</h5></p>
    
    
        <pre class="prettyprint"><code>map.on('layer-remove-many', function (event) {
  // 移除多个图层事件
  console.log("移除多个图层事件:", event)
});</code></pre>
    



                </div>
            
                <div class="member">
                    


    
    <h4 class="name" id="event:%E7%A7%BB%E9%99%A4%E6%89%80%E6%9C%89%E5%9B%BE%E5%B1%82%E4%BA%8B%E4%BB%B6">
        <a class="href-link" href="#event:%E7%A7%BB%E9%99%A4%E6%89%80%E6%9C%89%E5%9B%BE%E5%B1%82%E4%BA%8B%E4%BB%B6">#</a>
        
        <span class="code-name" id="移除所有图层事件" style="font-size:30px">
            
                移除所有图层事件
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>移除所有图层事件</p>
    </div>
    













    <h5 class="subsection-title">属性:</h5>

    
<div class="table-container">
    <table class="props table">
        <thead>
        <tr>
            
            <th>Name</th>
            

            <th>Type</th>

            
            <th>Attributes</th>
            

            
            <th>Default</th>
            

            <th class="last">Description</th>
        </tr>
        </thead>

        <tbody>
        
            
<tr class="deep-level-0">
    
        <td class="name"><code>event</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             Object
    
</span>



    
    </td>

    
        <td class="attributes">
        

        
        </td>
    

    
        <td class="default">
        
        </td>
    

    <td class="description last"><p>事件对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>type</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             String
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            'layer-remove-all'
        
        </td>
    

    <td class="description last"><p>移除所有图层事件</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>view</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             View
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>地图视图对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>sourceTarget</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             <a link="Map.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Map" Map.html>Map</a>
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>事件发起对象</p></td>
</tr>

  
      
<tr class="deep-level-1">
    
        <td class="name"><code>target</code></td>
    

    <td class="type">
    
        
<span class="param-type">
    
             View
    
</span>



    
    </td>

    
        <td class="attributes">
        
            &lt;optional><br>
        

        
        </td>
    

    
        <td class="default">
        
            null
        
        </td>
    

    <td class="description last"><p>事件接收对象</p></td>
</tr>

  

        
        </tbody>
    </table>
</div>



<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
</dl>























    <h5>示例</h5>
    
        <p class="code-caption"><h5>移除所有图层事件</h5></p>
    
    
        <pre class="prettyprint"><code>map.on('layer-remove-all', function (event) {
  // 移除所有图层事件
  console.log("移除所有图层事件:", event)
});</code></pre>
    



                </div>
            
            </div>
        </div>
    
</article>

</section>