UNPKG

@mapgis/webclient-leaflet-plugin

Version:

5,920 lines 80.1 kB
<!DOCTYPE html>
<html lang="en">

<head>
  
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title> MapView</title>
  <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
  <link type="text/css" rel="stylesheet" href="styles/app.min.css">
  <link type="text/css" rel="stylesheet" href="styles/iframe.css">
  <link type="text/css" rel="stylesheet" href="">

  
</head>



<body class="layout small-header">
    <div id="stickyNavbarOverlay"></div>
    

<div class="top-nav">
    <div class="inner">
        <a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
            <span aria-hidden="true"></span>
            <span aria-hidden="true"></span>
            <span aria-hidden="true"></span>
        </a>
        <div class="logo">
            
                <h1> MapGIS Client for JavaScript API</h1>
            
            
        </div>
        <div class="menu">
            
            <div class="navigation">
                
                    
                        <a
                            class="link user-link "
                            href="/docs/cesium/index.html"
                        >
                            Cesium
                        </a>
                    
                        <a
                            class="link user-link "
                            href="/docs/mapboxgl/index.html"
                        >
                            MapboxGL
                        </a>
                    
                        <a
                            class="link user-link "
                            href="/docs/leaflet/index.html"
                        >
                            Leaflet
                        </a>
                    
                        <a
                            class="link user-link "
                            href="/docs/openlayers/index.html"
                        >
                            OpenLayers
                        </a>
                    
                

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

    <div id="main">
        <div
            class="sidebar "
            id="sidebarNav"
        >
            <div>
                <span class="mapgis-api-document-span"><a href="index.html">API文档</a></span>
            </div>
            
                <div class="search-wrapper">
                    <input id="search" type="text" placeholder="搜索文档..." class="input">
                </div>
            
            <nav>
                
                    <div class="category"><div style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">视图模块</div><ul class="mapgis-sidebar-menus"><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="DrawControl.html">DrawControl</a><span style="display: none;"><p>绘制工具</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MapView.html">MapView</a><span style="display: none;"><p>二维场景视图(leaflet引擎),对地图引擎进行管理,如果要对地图图层进行管理请参考<code>Map</code>,<br/>
参考示例:
<a href='#MapView'>[初始化二维场景视图]</a>
<br>[ES5引入方式]:<br/>
Zondy.MapView() <br/>
[ES6引入方式]:<br/>
import { MapView } from '@mapgis/webclient-leaflet-plugin' <br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Popup.html">Popup</a><span style="display: none;"><p>二维场景信息弹窗(leaflet引擎)
参考示例:
<a href='#MapView'>[初始化二维场景视图]</a>
[ES6引入方式]:<br/>
import { Popup } from '@mapgis/webclient-leaflet-plugin' <br/>
自定义样式说明:<br/>
zondy-popup__content 弹窗容器样式<br/>
zondy-popup__tip 弹窗对话框箭头样式<br/>
zondy-popup__header 弹窗头部样式<br/>
zondy-popup__content 弹窗主体样式<br/>
zondy-popup__footer 弹窗底部样式<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Screenshot.html">Screenshot</a><span style="display: none;"><p>屏幕打印工具</p></span></li></ul><div style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">草图编辑模块</div><ul class="mapgis-sidebar-menus"><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditorLeaflet.html">SketchEditorLeaflet</a><span style="display: none;"><p>二维场景草图编辑类<br/>
<br>[ES5引入方式]:<br/>
const { SketchEditorLeaflet } = Zondy <br/>
[ES6引入方式]:<br/>
import { SketchEditorLeaflet } from &quot;@mapgis/webclient-leaflet-plugin&quot; <br/></p></span></li></ul><div style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">渲染器模块</div><ul class="mapgis-sidebar-menus"><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Zondy.ThemeLayer.GraphThemeLayer.html">GraphThemeLayer</a><span style="display: none;"><p>统计专题图通过为每个要素绘制统计图表来反映其对应的专题值的大小。它可同时表示多个字段属性信息,在区域本身与各区域之间形成横向和纵向的对比。<br>统计专题图多用于具有相关数量特征的地图上,比如表示不同地区多年的粮食产量、GDP、人口等,不同时段客运量、地铁流量等。目前提供的统计图类型有:柱状图(Bar),折线图(Line),饼图(Pie),三维柱状图(Bar3D),点状图(Point),环状图(Ring)。</p></span></li></ul></div>
                
            </nav>
        </div>
        <div class="core" id="main-content-wrapper">
            <div class="content">
                <header id="page-title" class="page-title">
                    <span class="page-title-main">类名</span>
                    <span class="page-title-sub">MapView</span>
                </header>
                




<section>

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


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

    
    <div class="description">
        <p>二维场景视图(leaflet引擎),对地图引擎进行管理,如果要对地图图层进行管理请参考<code>Map</code>,<br/>
参考示例:
<a href='#MapView'>[初始化二维场景视图]</a>
<br>[ES5引入方式]:<br/>
Zondy.MapView() <br/>
[ES6引入方式]:<br/>
import { MapView } from '@mapgis/webclient-leaflet-plugin' <br/></p>
    </div>
    









    <h4>参数:</h4>
    
<div class="table-container">
    <table class="params table">
        <thead>
        <tr>
            
            <th>名称</th>
            

            <th>类型</th>

            
            <th style="min-width: 100px;">默认值</th>
            

            <th class="last">描述</th>
        </tr>
        </thead>

        <tbody>
        

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

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


  
  </td>

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

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


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

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


  
  </td>

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

  <td class="description last"><p>图层管理容器对象</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>二维场景视图的容器(html的div标签)ID</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>最小缩放级数,在此设置则所有图层都不会浏览小于该级数的图片</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>最大缩放级数,在此设置则所有图层都不会浏览大于该级数的图片</p></td>
</tr>


  
    
<tr class="deep-level-1">
  
      <td class="name"><code>zoom</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>attributionControl</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>zoomControl</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>doubleClickZoom</code></td>
  

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

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


  
  </td>

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

  <td class="description last"><p>是否允许双击鼠标左键缩放或者缩放至图层中心点</p></td>
</tr>


  
    
<tr class="deep-level-1">
  
      <td class="name"><code>dragging</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>zoomSnap</code></td>
  

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


  
  </td>

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

  <td class="description last"><p>当使用flyTo缩放至中心点时,缩放级数乘以的系数</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>当触发zoomIn或者zoomOut操作时,缩放级数乘以的系数</p></td>
</tr>


  
    
<tr class="deep-level-1">
  
      <td class="name"><code>trackResize</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>keyboard</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>keyboardPanDelta</code></td>
  

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


  
  </td>

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

  <td class="description last"><p>使用键盘来平移或缩放地图时的系数,单位px</p></td>
</tr>


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

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

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


  
  </td>

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

  <td class="description last"><p>使用键盘来平移或缩放地图时的系数,单位px</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>滚轮事件的触发事件,单位毫秒</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>滚轮缩放时,地图缩放的像素单位,单位像素</p></td>
</tr>


  
    
<tr class="deep-level-1">
  
      <td class="name"><code>tapHold</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>tapTolerance</code></td>
  

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


  
  </td>

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

  <td class="description last"><p>手指有效触发范围,单位像素</p></td>
</tr>


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

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

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


  
  </td>

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

  <td class="description last"><p>是否启用手指两指缩放,当值为center,表示两只滑动,缩放至地图中心</p></td>
</tr>


  
    
<tr class="deep-level-1">
  
      <td class="name"><code>bounceAtZoomLimits</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>animation</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>center</code></td>
  

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


  
  </td>

  
      <td class="default">
      
          new Point({coordinates:[0,0]})
      
      </td>
  

  <td class="description last"><p>地图视图中心点</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>地图视图可视范围</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>地图视图比例尺</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>最大比例尺</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>最小比例尺</p></td>
</tr>


  
    
<tr class="deep-level-1">
  
      <td class="name"><code>popup</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>rotation</code></td>
  

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


  
  </td>

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

  <td class="description last"><p>地图视图旋转选项。单位为度,默认为0,表示不进行旋转</p></td>
</tr>


  



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line31">line 31</a>
            </span>
        </p>
    
</dl>





    <div class="method-parameter columns">
        <div class="column is-2"><label>绑定事件:</label></div>
        <div class="column is-10">
            <ul>
                <li>BaseView#event:地图视图加载完毕事件</li>
            
                <li>BaseView#event:鼠标点击事件</li>
            
                <li>BaseView#event:鼠标双击事件</li>
            
                <li>BaseView#event:鼠标按下事件</li>
            
                <li>BaseView#event:鼠标抬起事件</li>
            
                <li>BaseView#event:鼠标右键点击事件</li>
            
                <li>BaseView#event:鼠标移动事件</li>
            
                <li>BaseView#event:鼠标移出视图事件</li>
            
                <li>BaseView#event:鼠标移入视图事件</li>
            
                <li>BaseView#event:zoom变化事件</li>
            
                <li>BaseView#event:地图移动事件</li>
            
                <li>BaseView#event:地图大小变化事件</li>
            
                <li>BaseView#event:键盘输入事件</li>
            
                <li>BaseView#event:键盘按下事件</li>
            
                <li>BaseView#event:键盘抬起事件</li>
            
                <li>BaseView#event:地图视图改变事件</li>
            </ul>
        </div>
    </div>

















<p class="summary"><h5>支持如下方法:</h5>
<a href='#flyTo'>[1、视点跳转]</a><br/>
<a href='#destroy'>[2、销毁视图对象]</a><br/>
<a href='#getCenter'>[3、获取当前视图的中心点]</a><br/>
<a href='#getPixelCenter'>[3、获取当前视图的像素中心点]</a><br/>
<a href='#getZoom'>[4、获取当前缩放级数]</a><br/>
<a href='#getExtent'>[5、获取当前视图的地理范围]</a><br/>
<a href='#getPixelWorldExtent'>[6、获取当前视图的像素范围]</a><br/>
<a href='#getMinZoom'>[7、获取最小缩放级数]</a><br/>
<a href='#getMaxZoom'>[8、获取最大缩放级数]</a><br/>
<a href='#getSize'>[9、获取当前视图容器的宽高]</a><br/>
<a href='#toJSON'>[10、导出场景视图的配置文件]</a><br/>
<a href='#clone'>[11、克隆并返回一个新的场景视图对象]</a><br/>
<a href='#fromJSON'>[12、通过json构造并返回一个新的场景视图对象]</a><br/>
<a href='#takeScreenshot'>[13、屏幕快照]</a><br/>
<code>14、注册事件</code><br/>
<code>15、移除事件</code><br/>
<a href='#toMap'>[15、屏幕像素坐标点转地理坐标点]</a><br/>
<a href='#toScreen'>[16、地理坐标点转屏幕像素坐标点]</a><br/>
<a href='#hitTest'>[17、穿透检测]</a><br/>
<a href='#getLayer'>[18、根据实际图层对象查询并返回基础图层]</a><br/>
<a href='#getScale'>[19、获取当前比例尺]</a><br/></p>



    <h5>示例</h5>
    
        <p class="code-caption"><h7 id='MapView'>初始化一个二维场景视图</h7></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Map, MapView } = Zondy
// ES6引入方式
import { Map, MapView } from "@mapgis/webclient-leaflet-plugin"
// 初始化图层管理容器
const map = new Map();
// 初始化地图视图对象
const mapView = new MapView({
  // 二维场景视图的容器(html的div标签)ID
  viewId: "二维场景视图的容器的id",
  // 图层管理容器
  map: map
});</code></pre>
    



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

        


    <ul>
        <li>Evented</li>
    </ul>


    

    

    

    

    

    

    
        <div class='vertical-section'>
            <h3 id='member'>成员变量</h3>
            <div class="members">
            
                <div class="member">

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">SpatialReference</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">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line212">line 212</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Boolean</span>


    </span>

<h4 class="name" id="animation">
    <a class="href-link" href="#animation">#</a>
    
    <span class="code-name">
        animation
    </span>
    
</h4>




<div class="description">
    <p>是否启用视角跳转动画</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line157">line 157</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Point</span>


    </span>

<h4 class="name" id="center">
    <a class="href-link" href="#center">#</a>
    
    <span class="code-name">
        center
    </span>
    
</h4>




<div class="description">
    <p>地图视图中心点</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line133">line 133</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Extent</span>


    </span>

<h4 class="name" id="extent">
    <a class="href-link" href="#extent">#</a>
    
    <span class="code-name">
        extent
    </span>
    
</h4>




<div class="description">
    <p>地图视图可视范围</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line152">line 152</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Number</span>


    </span>

<h4 class="name" id="height">
    <a class="href-link" href="#height">#</a>
    
        
            <span class='tag'>readonly</span>
        
    
    <span class="code-name">
        height
    </span>
    
</h4>




<div class="description">
    <p>地图视图高度</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line168">line 168</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Number</span>


    </span>

<h4 class="name" id="maxScale">
    <a class="href-link" href="#maxScale">#</a>
    
    <span class="code-name">
        maxScale
    </span>
    
</h4>




<div class="description">
    <p>地图视图最大比例尺</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line185">line 185</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Number</span>


    </span>

<h4 class="name" id="minScale">
    <a class="href-link" href="#minScale">#</a>
    
    <span class="code-name">
        minScale
    </span>
    
</h4>




<div class="description">
    <p>地图视图最小比例尺</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line190">line 190</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type"><a href="Popup.html">Popup</a></span>


    </span>

<h4 class="name" id="popup">
    <a class="href-link" href="#popup">#</a>
    
    <span class="code-name">
        popup
    </span>
    
</h4>




<div class="description">
    <p>地图弹框popup</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line195">line 195</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Boolean</span>


    </span>

<h4 class="name" id="preferCanvas">
    <a class="href-link" href="#preferCanvas">#</a>
    
    <span class="code-name">
        preferCanvas
    </span>
    
</h4>




<div class="description">
    <p>视图渲染方式是否为canvas</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line200">line 200</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Boolean</span>


    </span>

<h4 class="name" id="rotation">
    <a class="href-link" href="#rotation">#</a>
    
    <span class="code-name">
        rotation
    </span>
    
</h4>




<div class="description">
    <p>地图视图旋转选项。单位为度,默认为0,表示不进行旋转</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line227">line 227</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Number</span>


    </span>

<h4 class="name" id="scale">
    <a class="href-link" href="#scale">#</a>
    
    <span class="code-name">
        scale
    </span>
    
</h4>




<div class="description">
    <p>地图视图比例尺</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line180">line 180</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Boolean</span>


    </span>

<h4 class="name" id="spatialReferenceLocked">
    <a class="href-link" href="#spatialReferenceLocked">#</a>
    
    <span class="code-name">
        spatialReferenceLocked
    </span>
    
</h4>




<div class="description">
    <p>是否锁定视图空间参考系</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line219">line 219</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Boolean</span>


    </span>

<h4 class="name" id="stationary">
    <a class="href-link" href="#stationary">#</a>
    
        
            <span class='tag'>readonly</span>
        
    
    <span class="code-name">
        stationary
    </span>
    
</h4>




<div class="description">
    <p>试图是否静止</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line232">line 232</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Number</span>


    </span>

<h4 class="name" id="width">
    <a class="href-link" href="#width">#</a>
    
        
            <span class='tag'>readonly</span>
        
    
    <span class="code-name">
        width
    </span>
    
</h4>




<div class="description">
    <p>地图视图宽度</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line162">line 162</a>
            </span>
        </p>
    
</dl>





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

    <span class="method-parameter is-pulled-right">
        <label>类型:</label>
        
<span class="param-type">Number</span>


    </span>

<h4 class="name" id="zoom">
    <a class="href-link" href="#zoom">#</a>
    
    <span class="code-name">
        zoom
    </span>
    
</h4>




<div class="description">
    <p>地图层级</p>
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line174">line 174</a>
            </span>
        </p>
    
</dl>





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

    
        <div class='vertical-section'>
            <h3 id='function'>方法</h3>
            <div class="members">
            
                <div class="member">


    
    <h4 class="name" id=".fromJSON">
        <a class="href-link" href="#.fromJSON">#</a>
        
            
                <span class='tag'>static</span>
            
        
        <span class="code-name" style="font-size:30px">
            
                fromJSON<span class="signature">(json)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>通过json构造并返回一个新的场景视图对象<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">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1274">line 1274</a>
            </span>
        </p>
    
</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 href="MapView.html">MapView</a></span>


    </div>
    
</div>

                
        </div>
    </div>






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


    
    <h4 class="name" id=".fromJSON">
        <a class="href-link" href="#.fromJSON">#</a>
        
            
                <span class='tag'>static</span>
            
        
        <span class="code-name" style="font-size:30px">
            
                fromJSON<span class="signature">(json)</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>json</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">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1971">line 1971</a>
            </span>
        </p>
    
</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"><a href="MapView.html">MapView</a></span>


    </div>
    
</div>

                
        </div>
    </div>






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


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

    
    <div class="description">
        <p>等待图层加载完毕,重写BaseView类的该方法</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">Layer</span>


  
  </td>

  

  <td class="description last"><p>基础图层对象</p></td>
</tr>



        

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

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


  
  </td>

  

  <td class="description last"><p>图层加载完毕后的对象</p></td>
</tr>



        

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

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


  
  </td>

  

  <td class="description last"><p>创建失败回调</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1103">line 1103</a>
            </span>
        </p>
    
</dl>























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


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

    
    <div class="description">
        <p>克隆并返回一个新的场景视图对象<a id='clone'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1265">line 1265</a>
            </span>
        </p>
    
</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 href="MapView.html">MapView</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" style="font-size:30px">
            
                destroy<span class="signature">()</span>
            
        </span>
    </h4>
    

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













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1131">line 1131</a>
            </span>
        </p>
    
</dl>























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


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

    
    <div class="description">
        <p>视点跳转<a id='flyTo'></a></p>
    </div>
    









    <h4>参数:</h4>
    
<div class="table-container">
    <table class="params table">
        <thead>
        <tr>
            
            <th>名称</th>
            

            <th>类型</th>

            
            <th style="min-width: 100px;">默认值</th>
            

            <th class="last">描述</th>
        </tr>
        </thead>

        <tbody>
        

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

  <td class="type">
  
  </td>

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

  <td class="description last"><p>跳转参数</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>跳转中心点</p></td>
</tr>


  
    
<tr class="deep-level-1">
  
      <td class="name"><code>zoom</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>extent</code></td>
  

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


  
  </td>

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

  <td class="description last"><p>按范围跳转</p></td>
</tr>


  



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line319">line 319</a>
            </span>
        </p>
    
</dl>























    <h5>示例</h5>
    
        <p class="code-caption"><h7>中心点跳转示例</h7></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Map, MapView } = Zondy
// ES6引入方式
import { Map, MapView } from "@mapgis/webclient-leaflet-plugin"
// 初始化图层管理容器
map = new .Map();
// 初始化地图视图对象
mapView = new MapView({
  // 视图id
  viewId: "view-id",
  // 图层管理容器
  map: map
});
// 视点跳转
mapView.flyTo({
  // 跳转中心点
  center: [{x}, {y}],
  // 地图层级
  zoom: {zoom}
});</code></pre>
    

        <p class="code-caption"><h7>按范围跳转示例</h7></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Map, MapView } = Zondy
const { Extent } = Zondy.Geometry
// ES6引入方式
import { Map, MapView, Extent } from "@mapgis/webclient-leaflet-plugin"
// 初始化图层管理容器
map = new Map();
// 初始化地图视图对象
mapView = new MapView({
  // 视图id
  viewId: "view-id",
  // 图层管理容器
  map: map
});
mapView.flyTo({
  // 范围几何
  extent: new Extent({
     "xmin":10,
     "xmax":210,
     "ymin":0,
     "ymax":100,
  })
});</code></pre>
    

        <p class="code-caption"><h7>按范围跳转示例-拿到图层信息后跳转</h7></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { IGSMapImageLayer } = Zondy.Layer
// ES6引入方式
import { IGSMapImageLayer } from "@mapgis/webclient-leaflet-plugin"
const igsMapImageLayer = new IGSMapImageLayer({
  url: 'http://192.168.82.89:8089/igs/rest/services/Map/Hubei4326/MapServer'
});
map.add(igsMapImageLayer);
// 图层加载完毕
igsMapImageLayer.on('layer-view-created', function (result) {
  console.log("加载完毕:", result.layer)
  //视点跳转
  mapView.flyTo({
    extent: result.layer.extent
  });
})</code></pre>
    


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


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

    
    <div class="description">
        <p>获取当前视图的中心点(经纬度中心点)<a id='getCenter'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1139">line 1139</a>
            </span>
        </p>
    
</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="getExtent">
        <a class="href-link" href="#getExtent">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                getExtent<span class="signature">()</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>获取当前视图的地理范围<a id='getExtent'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1405">line 1405</a>
            </span>
        </p>
    
</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">Extent</span>


    </div>
    
</div>

                
        </div>
    </div>






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


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

    
    <div class="description">
        <p>获取最大缩放级数<a id='getMaxZoom'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1210">line 1210</a>
            </span>
        </p>
    
</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="getMinZoom">
        <a class="href-link" href="#getMinZoom">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                getMinZoom<span class="signature">()</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>获取最小缩放级数<a id='getMinZoom'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1194">line 1194</a>
            </span>
        </p>
    
</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="getPixelCenter">
        <a class="href-link" href="#getPixelCenter">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                getPixelCenter<span class="signature">()</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>获取当前视图的像素中心点<a id='getPixelCenter'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1226">line 1226</a>
            </span>
        </p>
    
</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="getPixelExtent">
        <a class="href-link" href="#getPixelExtent">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                getPixelExtent<span class="signature">()</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>获取当前视图的宽高范围,单位像素<a id='getPixelExtent'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1218">line 1218</a>
            </span>
        </p>
    
</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="getPixelWorldExtent">
        <a class="href-link" href="#getPixelWorldExtent">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                getPixelWorldExtent<span class="signature">()</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>获取当前视图的像素范围<a id='getPixelWorldExtent'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1234">line 1234</a>
            </span>
        </p>
    
</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="getScale0">
        <a class="href-link" href="#getScale0">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                getScale0<span class="signature">()</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p><a id='getScale'></a>
获取当前比例尺</p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1825">line 1825</a>
            </span>
        </p>
    
</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>比例尺 实际10000米:地图1米</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="getSize">
        <a class="href-link" href="#getSize">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                getSize<span class="signature">()</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>获取当前视图容器的宽高,单位像素<a id='getSize'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1202">line 1202</a>
            </span>
        </p>
    
</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="getZoom">
        <a class="href-link" href="#getZoom">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                getZoom<span class="signature">()</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>获取当前缩放级数<a id='getZoom'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1174">line 1174</a>
            </span>
        </p>
    
</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="hitTest">
        <a class="href-link" href="#hitTest">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                hitTest<span class="signature">(screenPoint)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p>穿透检测,图元拾取。目前支持graphic类型拾取结果,支持图层类型GraphicLayer,FeatureLayer。</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>screenPoint</code></td>
  

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


  
  </td>

  

  <td class="description last"><p>屏幕像素坐标点,例如{ x: 900, y: 500 }</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1573">line 1573</a>
            </span>
        </p>
    
</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>






    <h5>示例</h5>
    
        <p class="code-caption"><h7>根据基础图层对象或者图层id查询并返回实际图层</h7></p>
    
    
        <pre class="prettyprint"><code>// ES6引入方式
import { MapView } from "@mapgis/webclient-leaflet-plugin";
import { Map, Point, Polygon, MultiPolygon ,Extent, GraphicsLayer, Feature, Circle, IGSFeatureLayer, IGSTileLayer } from "@mapgis/webclient-common";
// 初始化图层管理容器
const map = new Map();
// 初始化地图视图对象
this.mapView = new MapView({
  // 视图id
  viewId: "mapgis-2d-viewer",
  // 图层管理容器
  map: map,
})
// 创建一个要素
const feature = [
  new Feature({
    id: '11113',
    geometry: new Circle({
      center: [113, 35],
      radius: 10000,
      radiusUnit: 'kilometers',
    })
  }),
  new Feature({
    id: '11114',
    geometry: new Polygon({
      coordinates: [
        // 外圈
        [
          [113.0, 29.0],
          [116.0, 29.0],
          [116.0, 35.0],
          [113.0, 35.0],
          [113.0, 29.0]
        ]
      ]
    })
  }),
  new Feature({
    id: '11115',
    geometry:new MultiPolygon({
      coordinates: [
        [
          // 外圈
          [
            [112.0, 28.0],
            [115.0, 28.0],
            [115.0, 30.0],
            [112.0, 30.0],
            [112.0, 28.0]
          ],
          // 第一个内圈
          [
            [112.2, 28.2],
            [112.2, 29.8],
            [114.8, 29.8],
            [114.8, 28.2],
            [112.2, 28.2]
          ]
        ]
      ]
    })
  })
]
// 初始化几何图层
const graphicsLayer = new GraphicsLayer({
  graphics:feature
})
map.add(this.graphicsLayer)
const result = this.mapView.hitTest({x:1100,y:600})</code></pre>
    


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


    
    <h4 class="name" id="takeScreenshot">
        <a class="href-link" href="#takeScreenshot">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                takeScreenshot<span class="signature">(options<span class="signature-attributes">opt</span>)</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 style="min-width: 100px;">默认值</th>
            

            <th class="last">描述</th>
        </tr>
        </thead>

        <tbody>
        

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

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


  
  </td>

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

  <td class="description last"><p>屏幕快照配置配置</p></td>
</tr>


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

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


  
  </td>

  
      <td class="default">
      
          PictureFormat.png
      
      </td>
  

  <td class="description last"><p>照片格式,支持png,jpeg格式</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>下载文件名</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>图片宽度</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>图片高度</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>图片原点x</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>图片原点y</p></td>
</tr>


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


  



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1389">line 1389</a>
            </span>
        </p>
    
</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>屏幕快照 {dataUrl String },且浏览器会下载图片</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"><h7>屏幕快照</h7></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Map, MapView } = Zondy
const { PictureFormat } = Zondy.Enum
// ES6引入方式
import { Map, MapView } from "@mapgis/webclient-leaflet-plugin"
import { PictureFormat } from "@mapgis/webclient-common"
// 初始化图层管理容器
const map = new Map();
// 初始化地图视图对象
const mapView = new MapView({
  // 二维场景视图的容器(html的div标签)ID
  viewId: "二维场景视图的容器的id",
  // 图层管理容器
  map: map
})
// 设置屏幕快照参数
const screenshotOptions: {
   format: PictureFormat.png
}
// 开始屏幕快照
mapView.takeScreenshot(screenshotOptions).then((result) => {
  // 获取base64格式的url字符串
  console.log("dataUrl:", result.dataUrl)
})</code></pre>
    


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


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

    
    <div class="description">
        <p>导出场景视图的配置文件<a id='toJSON'></a></p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1242">line 1242</a>
            </span>
        </p>
    
</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="toMap">
        <a class="href-link" href="#toMap">#</a>
        
        <span class="code-name" style="font-size:30px">
            
                toMap<span class="signature">(screenPoint)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p><a id='toMap'></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>screenPoint</code></td>
  

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


  
  </td>

  

  <td class="description last"><p>屏幕像素坐标点,例如{ x: 900, y: 500 }</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1299">line 1299</a>
            </span>
        </p>
    
</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">Point</span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5>屏幕像素坐标点转地理坐标示例</h5></p>
    
    
        <pre class="prettyprint"><code>// ES6引入方式
import { MapView } from "@mapgis/webclient-leaflet-plugin"
import { Map, Point, Extent } from "@mapgis/webclient-common"
// 初始化图层管理容器
const map = new Map();
// 初始化地图视图对象
const mapView = new MapView({
  // 视图id
  viewId: "mapgis-2d-viewer",
  // 图层管理容器
  map: map
});
const screenPoint = { x: 900, y: 500 }
mapView.toMap(screenPoint)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='toScreen'></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>point</code></td>
  

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


  
  </td>

  

  <td class="description last"><p>地理坐标点</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="view_MapView.js.html" class="button">查看源代码</a>
            <span>
                <a href="view_MapView.js.html">view/MapView.js</a>, <a href="view_MapView.js.html#line1334">line 1334</a>
            </span>
        </p>
    
</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>地理坐标点转屏幕像素坐标示例</h5></p>
    
    
        <pre class="prettyprint"><code>// ES6引入方式
import { MapView } from "@mapgis/webclient-leaflet-plugin"
import { Map, Point, Extent } from "@mapgis/webclient-common"
// 初始化图层管理容器
const map = new Map();
// 初始化地图视图对象
const mapView = new MapView({
  // 视图id
  viewId: "mapgis-2d-viewer",
  // 图层管理容器
  map: map
});
const geoPoint = new Point({ coordinates: [123, 23, 0] })
mapView.toScreen(geoPoint)</code></pre>
    


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

    

    
</article>

</section>




            </div>
            
            <footer class="footer">
                <div class="content has-text-centered">
                    <p>文档生成<a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a></p>
                    <p class="sidebar-created-by">
                        <a href="http://www.smaryun.com" target="_blank">司马云</a> <span>© 2023 云生态圈</span>
                        <a href="http://192.168.82.89:8086/#/index" target="_blank">MapGIS Client for JavaScript</a>
                    </p>
                </div>
            </footer>
            
        </div>
        <div id="side-nav" class="side-nav">
            <div style="margin-bottom: 10px;">
                <img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#page-title">构造函数</a>
            </div>
            <div style="margin-bottom: 10px;">
                <img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#member">成员变量</a>
            </div>
            <div style="margin-bottom: 10px;">
                <img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#function">方法</a>
            </div>
            <div>
                <img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#event">事件</a>
            </div>
        </div>
    </div>
<script src="scripts/linenumber.js"> </script>

<script src="scripts/search.js"> </script>

</body>
</html>