UNPKG

@mapgis/webclient-leaflet-plugin

Version:

8,818 lines 216 kB
<!DOCTYPE html>
<html lang="en">

<head>
  
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title> GeometryEngine</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="AddressServer.html">AddressServer</a><span style="display: none;"><p>地址服务,基地址:/igs/rest/services/{folder}/{serviceName}/AddressServer</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ArcGISFeatureServer.html">ArcGISFeatureServer</a><span style="display: none;"><p>ArcGIS的FeatureServer服务</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ArcGISGeometryServer.html">ArcGISGeometryServer</a><span style="display: none;"><p>ArcGIS的GeometryServer服务</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ArcGISMapServer.html">ArcGISMapServer</a><span style="display: none;"><p>ArcGIS的MapServer服务</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ArcGISVectorTileServer.html">ArcGISVectorTileServer</a><span style="display: none;"><p>ArcGIS的VectorTileServer服务</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="BaseServer.html">BaseServer</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="Cesium3DTilesServer.html">Cesium3DTilesServer</a><span style="display: none;"><p>3DTiles服务,基地址:/igs/rest/services/{folder}/{serviceName}/3DTilesServer</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Config.html">Config</a><span style="display: none;"><p>全局配置信息<br/>
示例如下:<br/>
<a href='#config1'>[1、设置全局token]</a><br/>
<a href='#config2'>[2、设置全局headers]</a><br/>
<a href='#config3'>[3、设置拦截器 - 在所有链接上设置拦截器]</a><br/>
<a href='#config4'>[4、设置拦截器 - 指定拦截器应用的url]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="FeatureServer.html">FeatureServer</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="GeometryServer.html">GeometryServer</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="ImageServer.html">ImageServer</a><span style="display: none;"><p>影像服务,服务地址:/igs/rest/services/{folder}/{serviceName}/ImageServer</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Interceptor.html">Interceptor</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="M3DServer.html">M3DServer</a><span style="display: none;"><p>M3d服务,服务地址:/igs/rest/services/{folder}/{serviceName}/M3dServer</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MapServer.html">MapServer</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="PlotServer.html">PlotServer</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="PoiServer.html">PoiServer</a><span style="display: none;"><p>兴趣点服务,服务地址:/igs/rest/services/{folder}/{serviceName}/PoiServer</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="RequestConfig.html">RequestConfig</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="RequestInterceptor.html">RequestInterceptor</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="ResourceServer.html">ResourceServer</a><span style="display: none;"><p>资源服务,基地址为http://{ip}:{port}/igs/rest/services/system/ResourceServer</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ResponseInterceptor.html">ResponseInterceptor</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="RootServer.html">RootServer</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="SceneServer.html">SceneServer</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="SecurityServer.html">SecurityServer</a><span style="display: none;"><p>安全服务,服务地址:/igs/rest/services/SecurityServer</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="TerrainServer.html">TerrainServer</a><span style="display: none;"><p>地形缓存服务,基地址:/igs/rest/services/{folder}/{serviceName}/TerrainServer</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ThemeServer.html">ThemeServer</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="TileServer.html">TileServer</a><span style="display: none;"><p>瓦片服务,基地址:/igs/rest/services/{folder}/{serviceName}/TileServer</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="VectorTileServer.html">VectorTileServer</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="WFSServer.html">WFSServer</a><span style="display: none;"><p>IGS的WFS服务</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WMSServer.html">WMSServer</a><span style="display: none;"><p>IGS的WMS服务</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WMTSServer.html">WMTSServer</a><span style="display: none;"><p>IGS的WMTS服务</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WorkFlowServer.html">WorkFlowServer</a><span style="display: none;"><p>工作流服务,基地址http://{ip}:{port}/igs/rest/services/workflow/{serviceName}/WorkflowServer</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="ArcGISMapImageLayer.html">ArcGISMapImageLayer</a><span style="display: none;"><p>ArcGIS地图图片图层,<br/>
目前二维上支持4326(包括4490,4214以及4610),3857以及EPSG支持的自定义坐标系,三维上仅支持4326(包括4490,4214以及4610)以及3857坐标系,会自动读取元信息上的坐标系,不需要用户指定
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.ArcGISMapImageLayer() <br/>
[ES6引入方式]:<br/>
import { ArcGISMapImageLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ArcGISMapImageSubLayer.html">ArcGISMapImageSubLayer</a><span style="display: none;"><p>ArcGIS地图图片子图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ArcGISTileLayer.html">ArcGISTileLayer</a><span style="display: none;"><p>ArcGIS瓦片图层,<br>
目前二维上支持4326(包括4490,4214以及4610),3857以及EPSG支持的自定义坐标系,三维上仅支持4326(包括4490,4214以及4610)以及3857坐标系,会自动读取元信息上的坐标系,不需要用户指定,
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.ArcGISTileLayer() <br/>
[ES6引入方式]:<br/>
import { ArcGISTileLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ArcGISVectorTileLayer.html">ArcGISVectorTileLayer</a><span style="display: none;"><p>ArcGIS矢量瓦片图层
支持通过加载矢量瓦片服务、加载矢量瓦片样式文件和设置矢量瓦片样式的方式创建矢量瓦片图层
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.ArcGISVectorTileLayer() <br/>
[ES6引入方式]:<br/>
import { ArcGISVectorTileLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源以加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ArcGISVectorTileSubLayer.html">ArcGISVectorTileSubLayer</a><span style="display: none;"><p>ArcGIS矢量瓦片子图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Cesium3DTilesCacheLayer.html">Cesium3DTilesCacheLayer</a><span style="display: none;"><p>Cesium3DTiles图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="EchartsLayer.html">EchartsLayer</a><span style="display: none;"><p>Echarts图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="FeatureLayer.html">FeatureLayer</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="GeoJSONLayer.html">GeoJSONLayer</a><span style="display: none;"><p>geojson图层,仅支持文件服务<br/>
目前二维和三维上支持4326(包括4490,4214以及4610),3857以及EPSG支持的自定义坐标系,若是想要绘制源数据为非4326坐标系几何数据,需要在初始化时指定具体坐标系<br/>
参考示例:<br/>
<a href='#add-GeoJSONLayer'>[加载GeoJSON图层]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.GraphicsLayer() <br/>
[ES6引入方式]:<br/>
import { GraphicsLayer } from &quot;@mapgis/webclient-common&quot;</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="GraphicsLayer.html">GraphicsLayer</a><span style="display: none;"><p>几何图形图层,不支持在线数据,仅支持传入多个几何对象并绘制<br/>
目前二维和三维上支持4326(包括4490,4214以及4610),3857以及EPSG支持的自定义坐标系,若是想要绘制非4326坐标系几何,需要在初始化要素对象的几何时,指定具体坐标系
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.GraphicsLayer() <br/>
[ES6引入方式]:<br/>
import { GraphicsLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="GroupLayer.html">GroupLayer</a><span style="display: none;"><p>组图层,支持的图层类型有:WMS图层、WMTS图层、地图图层、瓦片图层、cesium3DTiles图层、echarts图层、
M3D图层、场景图层、矢量瓦片图层、mapv图层、地形图层
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.GroupLayer() <br/>
[ES6引入方式]:<br/>
import { GroupLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSFeatureLayer.html">IGSFeatureLayer</a><span style="display: none;"><p>IGS要素图层,<br>
目前二维和三维上支持4326(包括4490,4214以及4610),3857以及EPSG支持的自定义坐标系,要素服务会自动读取元信息上的坐标系,不需要用户指定
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.IGSFeatureLayer() <br/>
[ES6引入方式]:<br/>
import { IGSFeatureLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSImageLayer.html">IGSImageLayer</a><span style="display: none;"><p>IGS影像图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSMapImageLayer.html">IGSMapImageLayer</a><span style="display: none;"><p>IGS地图图片图层,<br/>
支持IGS1.0和2.0两个服务版本,支持自定义坐标系,当IGS版本是1.0时,需要手动设置图层坐标系,当IGS版本是2.0时,会自动读取元信息上的坐标系,不需要用户指定<br/>
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.IGSMapImageLayer() <br/>
[ES6引入方式]:<br/>
import { IGSMapImageLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSMapImageSubLayer.html">IGSMapImageSubLayer</a><span style="display: none;"><p>IGS地图图片图层的子图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSSceneLayer.html">IGSSceneLayer</a><span style="display: none;"><p>IGS的SceneLayer图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSSceneSubLayer.html">IGSSceneSubLayer</a><span style="display: none;"><p>IGS的SceneLayer子图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSTileLayer.html">IGSTileLayer</a><span style="display: none;"><p>IGS瓦片图层,<br>
支持IGS1.0和2.0两个服务版本,支持自定义坐标系,当IGS版本是1.0时,需要手动设置图层坐标系,当IGS版本是2.0时,会自动读取元信息上的坐标系,不需要用户指定,
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.IGSTileLayer() <br/>
[ES6引入方式]:<br/>
import { IGSTileLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSVectorTileLayer.html">IGSVectorTileLayer</a><span style="display: none;"><p>IGS矢量瓦片图层
支持IGS1.0和2.0两个服务版本,目前二维和三维上支持4326(包括4490,4214以及4610),3857,会自动读取元信息上的坐标系,不需要用户指定,
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.IGSVectorTileLayer() <br/>
[ES6引入方式]:<br/>
import { IGSVectorTileLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源以加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}
<br/>
<br/>
注意:三维上,不支持简单Marker样式设定;二维上,简单Marker的颜色,外边线样式,旋转角度无法在图层初始化和初始化后修改,须在制作数据时进行指定</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSVectorTileSubLayer.html">IGSVectorTileSubLayer</a><span style="display: none;"><p>IGS矢量瓦片子图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Layer.html">Layer</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="M3DModelCacheLayer.html">M3DModelCacheLayer</a><span style="display: none;"><p>M3D缓存图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MapImageLayer.html">MapImageLayer</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="MapVLayer.html">MapVLayer</a><span style="display: none;"><p>MapV图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="OGCLayer.html">OGCLayer</a><span style="display: none;"><p>OGS图层基类</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="OverlayLayer.html">OverlayLayer</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="Scene.html">Scene</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="SceneLayer.html">SceneLayer</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="SubLayer.html">SubLayer</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="TerrainCacheLayer.html">TerrainCacheLayer</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="TileLayer.html">TileLayer</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="UnknownLayer.html">UnknownLayer</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="VectorTileLayer.html">VectorTileLayer</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="WFSLayer.html">WFSLayer</a><span style="display: none;"><p>WFS图层,<br>
目前二维和三维上支持4326(包括4490,4214以及4610),3857以及EPSG支持的自定义坐标系,WFS服务会自动读取元信息上的坐标系,不需要用户指定
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.WMTSLayer() <br/>
[ES6引入方式]:<br/>
import { WMTSLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WMSLayer.html">WMSLayer</a><span style="display: none;"><p>WMS图层,<br/>
目前二维上支持4326(包括4490,4214以及4610),3857以及EPSG支持的自定义坐标系,三维上仅支持4326(包括4490,4214以及4610)以及3857坐标系,会自动读取元信息上的坐标系,不需要用户指定,同时所有的WMS服务都支持动态投影,用户也可指定任意该服务支持的坐标系<br/>
<br>[ES5引入方式]:<br/>
Zondy.Layer.WMSLayer() <br/>
[ES6引入方式]:<br/>
import { WMSLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WMSSubLayer.html">WMSSubLayer</a><span style="display: none;"><p>WMS子图层</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WMTSLayer.html">WMTSLayer</a><span style="display: none;"><p>WMTS图层,<br>
目前二维上支持4326(包括4490,4214以及4610),3857以及EPSG支持的自定义坐标系,三维上仅支持4326(包括4490,4214以及4610)以及3857坐标系,WMTS服务会自动读取元信息上的坐标系,不需要用户指定
<br><br>[ES5引入方式]:<br/>
Zondy.Layer.WMTSLayer() <br/>
[ES6引入方式]:<br/>
import { WMTSLayer } from &quot;@mapgis/webclient-common&quot; <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log(&quot;加载完毕:&quot;, result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WMTSSubLayer.html">WMTSSubLayer</a><span style="display: none;"><p>IGS地图服务图层</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="Basemap.html">Basemap</a><span style="display: none;"><p>基础地图对象
<br>[ES5引入方式]:<br/>
Zondy.Basemap() <br/>
[ES6引入方式]:<br/>
import { Map } from &quot;@mapgis/webclient-common&quot; <br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Map.html">Map</a><span style="display: none;"><p>图层管理容器,和地图引擎无关,通过此对象而不是地图引擎来对图层进行管理
<br>[ES5引入方式]:<br/>
Zondy.Map() <br/>
[ES6引入方式]:<br/>
import { Map } from &quot;@mapgis/webclient-common&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="BaseRenderer.html">BaseRenderer</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="ClassBreakInfo.html">ClassBreakInfo</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="ClassBreakRenderer.html">ClassBreakRenderer</a><span style="display: none;"><p>分段专题图渲染样式,支持的图层如下:<br/>
<a href="IGSMapImageLayer.html"><code>IGS地图图片图层</code></a>、<a href="GraphicsLayer.html"><code>几何图形图层</code></a>、<a href="IGSFeatureLayer.html"><code>IGS要素图层</code></a>、
<a href="GeoJSONLayer.html"><code>geojson图层</code></a>、<a href="WFSLayer.html"><code>OGC-WFS图层</code></a></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ClusterInfo.html">ClusterInfo</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="ClusterRenderer.html">ClusterRenderer</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="ColorStop.html">ColorStop</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="ColorVariable.html">ColorVariable</a><span style="display: none;"><p>color视觉变量</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="HeatmapColorStop.html">HeatmapColorStop</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="HeatmapRenderer.html">HeatmapRenderer</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="OpacityStop.html">OpacityStop</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="OpacityVariable.html">OpacityVariable</a><span style="display: none;"><p>opacity视觉变量</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="RandomRenderer.html">RandomRenderer</a><span style="display: none;"><p>随机渲染器,将随机颜色赋予要素,根据zoom等级颜色也将发生变化</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="RankRenderer.html">RankRenderer</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="SimpleRenderer.html">SimpleRenderer</a><span style="display: none;"><p>统一专题图渲染样式,支持的图层如下:<br/>
<a href="GraphicsLayer.html"><code>几何图形图层</code></a>、<a href="IGSFeatureLayer.html"><code>IGS要素图层</code></a>、
<a href="GeoJSONLayer.html"><code>geojson图层</code></a>、<a href="WFSLayer.html"><code>OGC-WFS图层</code></a></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SizeStop.html">SizeStop</a><span style="display: none;"><p>size视觉变量</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SizeVariable.html">SizeVariable</a><span style="display: none;"><p>size视觉变量</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="UniqueValueInfo.html">UniqueValueInfo</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="UniqueValueRenderer.html">UniqueValueRenderer</a><span style="display: none;"><p>单值专题图渲染样式,支持的图层如下:<br/>
<a href="IGSMapImageLayer.html"><code>IGS地图图片图层</code></a>、<a href="GraphicsLayer.html"><code>几何图形图层</code></a>、<a href="IGSFeatureLayer.html"><code>IGS要素图层</code></a>、
<a href="GeoJSONLayer.html"><code>geojson图层</code></a>、<a href="WFSLayer.html"><code>OGC-WFS图层</code></a></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="VisualVariable.html">VisualVariable</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="Zondy.ThemeLayer.GraphThemeLayer.html">GraphThemeLayer</a><span style="display: none;"><p>统计专题图通过为每个要素绘制统计图表来反映其对应的专题值的大小。它可同时表示多个字段属性信息,在区域本身与各区域之间形成横向和纵向的对比。<br>统计专题图多用于具有相关数量特征的地图上,比如表示不同地区多年的粮食产量、GDP、人口等,不同时段客运量、地铁流量等。目前提供的统计图类型有:柱状图(Bar),折线图(Line),饼图(Pie),三维柱状图(Bar3D),点状图(Point),环状图(Ring)。</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="BaseView.html">BaseView</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引擎),对地图引擎进行管理,如果要对地图图层进行管理请参考<a href="Map.html"><code>Map</code></a>,<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="VideoMapView.html">VideoMapView</a><span style="display: none;">undefined</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="Callout3D.html">Callout3D</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="ColorMaterial.html">ColorMaterial</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="Edges3D.html">Edges3D</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="ExtrudeSymbol3DLayer.html">ExtrudeSymbol3DLayer</a><span style="display: none;"><p>三维拉伸区符号图层,用来在三维场景中绘制拉伸的区几何,不支持二维地图视图<br/>
示例如下:<br/>
<a href='#ExtrudeSymbol3DLayer'>[1、创建三维拉伸区符号图层]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="FillSymbol.html">FillSymbol</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="FillSymbol3DLayer.html">FillSymbol3DLayer</a><span style="display: none;"><p>三维区符号图层,用于在三维场景中绘制平面区对象,不支持二维视图<br/>
示例如下:<br/>
<a href='#FillSymbol3DLayer'>[1、创建三维区符号图层]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="FillSymbol3DOutline.html">FillSymbol3DOutline</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="IconResource.html">IconResource</a><span style="display: none;"><p>图标资源,如果没有设置href,则使用系统自带的图标</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IconSymbol3DLayer.html">IconSymbol3DLayer</a><span style="display: none;"><p>三维图标符号图层,用来在三维场景中绘制图标,不支持二维地图视图<br/>
支持使用网络图片资源或者使用系统自带的图标资源<br/>
是一个始终朝向屏幕,并且立起来的图标<br/>
示例如下:<br/>
<a href='#IconSymbol3DLayer-href'>[1、使用网络资源创建一个三维图标图层对象]</a><br/>
<a href='#IconSymbol3DLayer-primitive'>[2、使用系统自带资源创建一个三维图标图层对象]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LabelSymbol3D.html">LabelSymbol3D</a><span style="display: none;"><p>三维注记符号,用于在三维场景中渲染线几何要素,不支持在二维视图中使用;<br/>
三维注记符号必须包含如下符号图层中的一个或多个,才能在三维场景中显示要素:<br/>
<a href="TextSymbol3DLayer.html"><code>三维文字符号图层</code></a><br/>
示例如下:<br/>
<a href='#LabelSymbol3D'>[1、创建一个三维注记符号对象]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LineCallout3D.html">LineCallout3D</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="LineStyleMarker3D.html">LineStyleMarker3D</a><span style="display: none;"><p>设置线的端点的Marker的样式</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LineStylePattern3D.html">LineStylePattern3D</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="LineSymbol.html">LineSymbol</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="LineSymbol3D.html">LineSymbol3D</a><span style="display: none;"><p>三维线符号,用于在三维场景中渲染线几何要素,不支持在二维视图中使用;<br/>
三维线符号必须包含如下符号图层中的一个或多个,才能在三维场景中显示要素:<br/>
<a href="LineSymbol3DLayer.html"><code>三维线符号图层</code></a>、<a href="PathSymbol3DLayer.html"><code>三维管道符号图层</code></a><br/>
示例如下:<br/>
<a href='#LineSymbol3D'>[1、创建线三维符号]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LineSymbol3DLayer.html">LineSymbol3DLayer</a><span style="display: none;"><p>三维线符号图层,用来在三维场景中绘制二维线,不支持二维地图视图<br/>
示例如下:<br/>
<a href='#LineSymbol3DLayer'>[1、创建三维线符号图层]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LineSymbolMarker.html">LineSymbolMarker</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="MapGISTextSymbol.html">MapGISTextSymbol</a><span style="display: none;"><p>文本符号,支持点几何对象,参考示例:<a href='#new-MapGISTextSymbol'>[创建文本样式]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.Symbol.MapGISTextSymbol() <br/>
[ES6引入方式]:<br/>
import { MapGISTextSymbol } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MarkerSymbol.html">MarkerSymbol</a><span style="display: none;"><p>Marker符号基类</p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ObjectSymbol3DLayer.html">ObjectSymbol3DLayer</a><span style="display: none;"><p>三维体对象符号图层,使用三维体符号来绘制一个点几何要素<br/>
通过设置resource的primitive属性来设置符号形状,支持如下形状:<br/>
sphere、cylinder、cube、cone、inverted-cone、diamond、tetrahedron<br/>
也可通过设置resource中的href属性,来加载gltf数据<br/>
同时通过设置material属性来设置符号的外观<br/>
示例如下:<br/>
<a href='#ObjectSymbol3DLayer-href'>[1、使用网络资源创建一个三维体对象符号图层对象]</a><br/>
<a href='#ObjectSymbol3DLayer-primitive'>[2、使用系统自带资源创建一个三维体对象符号图层对象]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="PathSymbol3DLayer.html">PathSymbol3DLayer</a><span style="display: none;"><p>三维管道符号图层,定义如何在三维场景视图中绘制一个管道线<br/>
示例如下:<br/>
<a href='#PathSymbol3DLayer'>[1、创建三维管道符号图层]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="PictureFillSymbol.html">PictureFillSymbol</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="PictureMarkerSymbol.html">PictureMarkerSymbol</a><span style="display: none;"><p>图片Marker符号,支持点几何对象,参考示例:<a href='#new-PictureMarkerSymbol'>[图片Marker样式]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.Symbol.PictureMarkerSymbol() <br/>
[ES6引入方式]:<br/>
import { PictureMarkerSymbol } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="PointSymbol3D.html">PointSymbol3D</a><span style="display: none;"><p>三维点符号,在三维场景中渲染点几何要素,不支持二维视图;<br/>
三维点符号必须包含如下符号图层中的一个或多个,才能在三维场景中显示要素:<br/>
<a href="IconSymbol3DLayer.html"><code>三维图标符号图层</code></a>、<a href="ObjectSymbol3DLayer.html"><code>三维对象符号图层</code></a>、<a href="TextSymbol3DLayer.html"><code>三维文字符号图层</code></a><br/>
示例如下:<br/>
<a href='#PointSymbol3D'>[1、创建一个三维点符号对象]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="PointSymbol3DOutline.html">PointSymbol3DOutline</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="PolygonSymbol3D.html">PolygonSymbol3D</a><span style="display: none;"><p>三维体符号,用于在三维场景视图中渲染几何要素,不支持二维视图<br/>
三维体符号必须包含如下符号图层中的一个或多个,才能在三维场景中显示要素:<br/>
<a href="FillSymbol3DLayer.html"><code>三维区符号图层</code></a>、<a href="ExtrudeSymbol3DLayer.html"><code>三维拉伸区符号图层</code></a>、<a href="LineSymbol3DLayer.html"><code>三维线符号图层</code></a>、<a href="IconSymbol3DLayer.html"><code>三维图标符号图层</code></a>、<a href="ObjectSymbol3DLayer.html"><code>三维体对象符号图层</code></a>、<a href="TextSymbol3DLayer.html"><code>三维注记符号图层</code></a><br/>
示例如下:<br/>
<a href='#PolygonSymbol3D'>[1、创建一个三维体符号对象]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SimpleFillSymbol.html">SimpleFillSymbol</a><span style="display: none;"><p>简单填充符号,参考示例:<a href='#new-SimpleFillSymbol'>[填充符号样式]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.Symbol.SimpleFillSymbol() <br/>
[ES6引入方式]:<br/>
import { SimpleFillSymbol } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SimpleLineSymbol.html">SimpleLineSymbol</a><span style="display: none;"><p>简单线符号,支持线几何对象,参考示例:<a href='#new-SimpleLineSymbol'>[线符号样式]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.Symbol.SimpleLineSymbol() <br/>
[ES6引入方式]:<br/>
import { SimpleLineSymbol } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SimpleMarkerSymbol.html">SimpleMarkerSymbol</a><span style="display: none;"><p>简单Marker符号,支持点几何对象,参考示例:<a href='#new-SimpleMarkerSymbol'>[简单Marker样式]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.Symbol.SimpleMarkerSymbol() <br/>
[ES6引入方式]:<br/>
import { SimpleMarkerSymbol } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="StylePattern3D.html">StylePattern3D</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="Symbol.html">Symbol</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="Symbol3DLayer.html">Symbol3DLayer</a><span style="display: none;"><p>三维符号图层基类,用来定义在三维中展示的点、线、区几何以及gltf的样式<br/>
所有的三维符号都有一个symbolLayers属性,是一个Symbol3DLayer的集合对象,所有的符号必须至少拥有一个或多个三维符号图层,才能进行正常显示<br/>
现有如下类型的三维符号图层:<br/>
IconSymbol3DLayer、ObjectSymbol3DLayer、LineSymbol3DLayer、PathSymbol3DLayer、FillSymbol3DLayer、WaterSymbol3DLayer、ExtrudeSymbol3DLayer、TextSymbol3DLayer<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Symbol3DVerticalOffset.html">Symbol3DVerticalOffset</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="TextHalo.html">TextHalo</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="TextSymbol.html">TextSymbol</a><span style="display: none;"><p>文本符号,支持点几何对象,参考示例:<a href='#new-TextSymbol'>[创建文本样式]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.Symbol.TextSymbol() <br/>
[ES6引入方式]:<br/>
import { TextSymbol } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="TextSymbol3DLayer.html">TextSymbol3DLayer</a><span style="display: none;"><p>三维注记符号图层,定义如何在三维场景中显示文字,不支持二维视图<br/>
示例如下:<br/>
<a href='#TextSymbol3DLayer'>[1、创建一个三维注记符号图层对象]</a><br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WaterSymbol3DLayer.html">WaterSymbol3DLayer</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="Circle.html">Circle</a><span style="display: none;"><p>几何圆,参考示例:<a href='#Circle'>[几何圆对象]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.Geometry.Circle() <br/>
[ES6引入方式]:<br/>
import { Circle } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Extent.html">Extent</a><span style="display: none;"><p>几何范围对象,即左下角和右上角组成的矩形范围几何对象,参考示例:<a href='#Extent'>[几何范围对象]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.Geometry.Extent() <br/>
[ES6引入方式]:<br/>
import { Extent } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Geometry.html">Geometry</a><span style="display: none;"><p>几何图形对象基类
<br><br>[ES5引入方式]:<br/>
Zondy.Geometry.Geometry() <br/>
[ES6引入方式]:<br/>
import { Geometry } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="GeometryEngine.html">GeometryEngine</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="LineString.html">LineString</a><span style="display: none;"><p>线几何对象
<br><br>[ES5引入方式]:<br/>
Zondy.Geometry.LineString() <br/>
[ES6引入方式]:<br/>
import { LineString } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MultiLineString.html">MultiLineString</a><span style="display: none;"><p>多线段几何
<br><br>[ES5引入方式]:<br/>
Zondy.Geometry.MultiLineString() <br/>
[ES6引入方式]:<br/>
import { MultiLineString } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MultiPoint.html">MultiPoint</a><span style="display: none;"><p>多点几何对象
<br><br>[ES5引入方式]:<br/>
Zondy.Geometry.MultiPoint() <br/>
[ES6引入方式]:<br/>
import { MultiPoint } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MultiPolygon.html">MultiPolygon</a><span style="display: none;"><p>多区几何
<br><br>[ES5引入方式]:<br/>
Zondy.Geometry.MultiPolygon() <br/>
[ES6引入方式]:<br/>
import { MultiPolygon } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Point.html">Point</a><span style="display: none;"><p>点几何对象
<br><br>[ES5引入方式]:<br/>
Zondy.Geometry.Point() <br/>
[ES6引入方式]:<br/>
import { Point } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Polygon.html">Polygon</a><span style="display: none;"><p>区几何,由多个环(ring)构成的几何对象,仅支持带洞区和非带洞区,不支持带岛区,即三个圈重叠<br/>
多边形的第一个环(ring)即外圈,从第二个环开始为内圈,内圈可以重合、相交、自相交,但是不能超过外圈
<br><br>[ES5引入方式]:<br/>
Zondy.Geometry.Polygon() <br/>
[ES6引入方式]:<br/>
import { Polygon } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Projection.html">Projection</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="SpatialReference.html">SpatialReference</a><span style="display: none;"><p>空间参考系
<br><br>[ES5引入方式]:<br/>
Zondy.SpatialReference() <br/>
[ES6引入方式]:<br/>
import { SpatialReference } from &quot;@mapgis/webclient-common&quot; <br/>
<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="">undefined</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="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="Evented.html">Evented</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="UpdateContent.html">UpdateContent</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="Feature.html">Feature</a><span style="display: none;"><p>要素对象,示例如下:<a id='add-Feature'>[初始化要素对象]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.Feature() <br/>
[ES6引入方式]:<br/>
import { Feature } from &quot;@mapgis/webclient-common&quot; <br/>
<br/></p></span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="FeatureSet.html">FeatureSet</a><span style="display: none;"><p>要素集合类,示例如下:<a id='add-FeatureSet'>[初始化要素集合对象]</a>
<br><br>[ES5引入方式]:<br/>
Zondy.FeatureSet() <br/>
[ES6引入方式]:<br/>
import { FeatureSet } from &quot;@mapgis/webclient-common&quot; <br/>
<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="">undefined</div><ul class="mapgis-sidebar-menus"><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></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="SketchBaseDrawTool.html">SketchBaseDrawTool</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="SketchCircleDrawTool.html">SketchCircleDrawTool</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="SketchEditor.html">SketchEditor</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="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><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditorVideo.html">SketchEditorVideo</a><span style="display: none;">undefined</span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditorVideoBase.html">SketchEditorVideoBase</a><span style="display: none;">undefined</span></li><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchExtentDrawTool.html">SketchExtentDrawTool</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="SketchPointDrawTool.html">SketchPointDrawTool</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="SketchPolygonDrawTool.html">SketchPolygonDrawTool</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="SketchPolylineDrawTool.html">SketchPolylineDrawTool</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="SketchStage.html">SketchStage</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="SketchStyle.html">SketchStyle</a><span style="display: none;"><p>草图样式管理类</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">GeometryEngine</span>
                </header>
                




<section>

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


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

    
    <div class="description">
        <p>几何分析工具</p>
    </div>
    













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line18">line 18</a>
            </span>
        </p>
    
</dl>





















<p class="summary"><h5>支持如下方法:</h5>
<a href='#contains'>[1、是否包含(contains)]</a><br/>
<a href='#crosses'>[2、是否穿过]</a><br/>
<a href='#cut'>[3、几何切割]</a><br/>
<a href='#difference'>[4、几何求差]</a><br/>
<a href='#disjoint'>[5、是否相离]</a><br/>
<a href='#equals'>[6、是否相等]</a><br/>
<a href='#intersects'>[7、是否相交]</a><br/>
<a href='#intersect'>[8、返回两个几何对象的相交部分]</a><br/>
<a href='#nearestCoordinate'>[9、距离最近的点]</a><br/>
<a href='#overlaps'>[10、是否重叠]</a><br/>
<a href='#planarArea'>[11、计算平面面积]</a><br/>
<a href='#planarLength'>[12、计算平面长度]</a><br/>
<a href='#geodesicLength'>[13、计算地理长度]</a><br/>
<a href='#rotate'>[14、旋转]</a><br/>
<a href='#distance'>[15、计算距离]</a><br/>
<a href='#touches'>[16、是否相邻]</a><br/>
<a href='#union'>[17、求并]</a><br/>
<a href='#within'>[18、是否被包含(within)]</a><br/>
<a href='#buffer'>[19、缓冲区分析]</a><br/>
<a href='#isSimple'>[20、拓扑检查]</a><br/>
<a href='#getPositionsFromArc'>[21、通过三点弧段构造一组离散的点坐标]</a><br/>
<a href='#getArcFromGeometry'>[22、通过几何中的三点弧段数据,构造离散后的几何对象]</a><br/>
<a href='#getCenter'>[23、通过三个点求圆心]</a><br/>
<a href='#getAngleFromPoints'>[24、计算三点之间的夹角]</a><br/>
<a href='#simplify'>[25、拓扑矫正]</a><br/></p>




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

    

    

    

    

    

    

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


    
    <h4 class="name" id=".buffer">
        <a class="href-link" href="#.buffer">#</a>
        
            
                <span class='tag'>static</span>
            
        
        <span class="code-name" style="font-size:30px">
            
                buffer<span class="signature">(geometry<span class="signature-attributes">opt</span>, distance<span class="signature-attributes">opt</span>, unit<span class="signature-attributes">opt</span>, unionResults<span class="signature-attributes">opt</span>)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p><a id='buffer'></a>
缓冲区分析;<br/>
支持点几何、多点几何、线几何、多线几何、区几何、多区几何、矩形几何、圆形几何或任意几何组成的几何数组;<br/>
忽略三维高度,当geometry为几何数组时,其子元素的坐标系必须相同;<br/>
如果distance是数字,则可以为正值或负值,是正值则向外扩张,是负值,则表示向内收缩;<br/>
如果distance是数字,且geometry为几何数组,则该数字会应用到所有geometry数组的子元素;<br/>
如果distance是数组且geometry是数组,当distance的长度小于geometry数组的长度时,会以distance的最后一个子元素扩充distance数组,使其长度和geometry数组的长度相同,之后将distance数组和geometry数组根据下标一一对应,执行缓冲区分析;<br/>
如果distance是数组,但geometry不是数组,则使distance数组的第一个子元素做为缓冲距离来执行缓冲区分析;<br/>
注意一个或多个几何执行缓冲区分析后,由于缓冲后几何扩大,可能导致一个或多个几何出现重合的情况;;<br/>
示例如下:<br/>
<a href='#buffer1'>[1、区缓冲分析]</a><br/>
<a href='#buffer2'>[2、多区缓冲分析]</a><br/>
<a href='#buffer3'>[3、几何数组缓冲区分析]</a><br/>
<a href='#buffer4'>[4、几何数组缓冲区分析 - 结果几何合并]</a><br/>
<a href='#buffer5'>[5、区缓冲分析 - 自定义坐标系]</a><br/>
<a href='#buffer6'>[6、点缓冲分析]</a><br/>
<a href='#buffer7'>[7、线缓冲分析]</a><br/>
<a href='#buffer8'>[8、矩形缓冲分析]</a><br/>
<a href='#buffer9'>[9、圆形缓冲分析]</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>geometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>
|

<span class="param-type">Array.&lt;<a href="Geometry.html">Geometry</a>></span>


  
  </td>

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

  <td class="description last"><p>要进行缓冲区分析的几何对象</p></td>
</tr>



        

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

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

<span class="param-type">Array.&lt;Number></span>


  
  </td>

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

  <td class="description last"><p>缓冲距离</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="global.html#LengthUnit">LengthUnit</a></span>


  
  </td>

  
      <td class="default">
      
          LengthUnit.meter
      
      </td>
  

  <td class="description last"><p>单位,默认米</p></td>
</tr>



        

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

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


  
  </td>

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

  <td class="description last"><p>是否将返回的多个几何对象合并为单几何对象,默认为false,即不合并几何</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line581">line 581</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="Geometry.html">Geometry</a></span>
|

<span class="param-type">Array.&lt;<a href="Geometry.html">Geometry</a>></span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='buffer1'>区缓冲分析</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造多边形
const polygon = new Polygon({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578],
      [116.13094, 33.273224],
      [108.36341, 33.273224],
      [108.36341, 29.032578],
    ]
  ]
})
// 执行缓冲区分析
const bufferedPolygon = GeometryEngine.buffer(polygon, 100000)</code></pre>
    

        <p class="code-caption"><h5 id='rotate2'>多区缓冲分析</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiPolygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiPolygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造多边形
const polygon = new MultiPolygon({
  coordinates: [
    [
      [
        [108.36341, 29.032578],
        [112.13094, 29.032578],
        [112.13094, 33.273224],
        [108.36341, 33.273224],
        [108.36341, 29.032578],
      ]
    ],
    [
      [
        [113.36341, 29.032578],
        [116.13094, 29.032578],
        [116.13094, 33.273224],
        [113.36341, 33.273224],
        [113.36341, 29.032578],
      ]
    ]
  ]
})
// 执行缓冲区分析
const bufferedPolygon = GeometryEngine.buffer(polygon, 30000)</code></pre>
    

        <p class="code-caption"><h5 id='buffer3'>几何对象数组的缓冲区分析</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, MultiPolygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, MultiPolygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造多边形
const polygon1 = new MultiPolygon({
  coordinates: [
    [
      [
        [110.36341, 29.032578],
        [112.13094, 29.032578],
        [112.13094, 33.273224],
        [110.36341, 33.273224],
        [110.36341, 29.032578],
      ]
    ],
    [
      [
        [113.36341, 29.032578],
        [116.13094, 29.032578],
        [116.13094, 33.273224],
        [113.36341, 33.273224],
        [113.36341, 29.032578],
      ]
    ]
  ]
})
// 构造多边形2
const polygon2 = new Polygon({
  coordinates: [
    [
      [108.36341, 29.032578],
      [109.13094, 29.032578],
      [109.13094, 33.273224],
      [108.36341, 33.273224],
      [108.36341, 29.032578],
    ]
  ]
})
// 执行缓冲区分析,distance可谓数字或数组
const bufferedPolygon = GeometryEngine.buffer([polygon1, polygon2], [30000, 30000])</code></pre>
    

        <p class="code-caption"><h5 id='buffer4'>几何数组缓冲区分析 - 分析结果几何求并</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, MultiPolygon, LengthUnit, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, MultiPolygon, LengthUnit, GeometryEngine } from "@mapgis/webclient-common"
// 构造多边形
const polygon1 = new MultiPolygon({
  coordinates: [
    [
      [
        [110.36341, 29.032578],
        [112.13094, 29.032578],
        [112.13094, 33.273224],
        [110.36341, 33.273224],
        [110.36341, 29.032578],
      ]
    ],
    [
      [
        [113.36341, 29.032578],
        [116.13094, 29.032578],
        [116.13094, 33.273224],
        [113.36341, 33.273224],
        [113.36341, 29.032578],
      ]
    ]
  ]
})
// 构造多边形2
const polygon2 = new Polygon({
  coordinates: [
    [
      [108.36341, 29.032578],
      [109.13094, 29.032578],
      [109.13094, 33.273224],
      [108.36341, 33.273224],
      [108.36341, 29.032578],
    ]
  ]
})
// 执行缓冲区分析,设置unionResults参数为true
const bufferedPolygon = GeometryEngine.buffer([polygon1, polygon2], [30000], LengthUnit.meter, true)</code></pre>
    

        <p class="code-caption"><h5 id='buffer5'>区缓冲分析 - 自定义坐标系</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, SpatialReference, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, SpatialReference, GeometryEngine } from "@mapgis/webclient-common"
// 构造多边形
const polygon = new Polygon({
  coordinates: [
    [
      [-45257.10778559791, 3212885.1836444484],
      [705989.8953363781, 3212885.1836444484],
      [705989.8953363781, 3691623.86404564],
      [-45257.10778559791, 3691623.86404564],
      [-45257.10778559791, 3212885.1836444484],
    ]
  ],
  // 注意要指定坐标系
  spatialReference: new SpatialReference({
    wkid: 4547
  })
})
// 执行缓冲区分析
const bufferedPolygon = GeometryEngine.buffer(polygon, 100000)</code></pre>
    

        <p class="code-caption"><h5 id='buffer6'>点缓冲分析</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Point, GeometryEngine } from "@mapgis/webclient-common"
// 构造点几何
const point = new Point({
  coordinates: [108.36341, 29.032578]
})
// 执行缓冲区分析
const bufferedPolygon = GeometryEngine.buffer(point, 100000)</code></pre>
    

        <p class="code-caption"><h5 id='buffer7'>线缓冲分析</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造线
const lineString = new LineString({
  coordinates: [
    [108.36341, 29.032578],
    [109.36341, 29.032578]
  ]
})
// 执行缓冲区分析
const bufferedPolygon = GeometryEngine.buffer(lineString, 10000)</code></pre>
    

        <p class="code-caption"><h5 id='buffer8'>矩形缓冲分析</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造矩形
const extent = new Extent({
  xmin: 112,
  xmax: 114,
  ymin: 30,
  ymax: 32
})
// 执行缓冲区分析
const bufferedPolygon = GeometryEngine.buffer(extent, 10000)</code></pre>
    

        <p class="code-caption"><h5 id='buffer9'>圆形缓冲分析</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Circle, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Circle, GeometryEngine } from "@mapgis/webclient-common"
// 构造圆形
const circle = new Circle({
  center: [112, 30],
  radius: 3
})
// 执行缓冲区分析
const bufferedPolygon = GeometryEngine.buffer(circle, 10000)</code></pre>
    


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


    
    <h4 class="name" id=".contains">
        <a class="href-link" href="#.contains">#</a>
        
            
                <span class='tag'>static</span>
            
        
        <span class="code-name" style="font-size:30px">
            
                contains<span class="signature">(containerGeometry<span class="signature-attributes">opt</span>, insideGeometry<span class="signature-attributes">opt</span>)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p><a id='contains'></a>
判断containerGeometry对象是否完全包含insideGeometry对象;<br/>
忽略三维高度;<br/>
支持自定义坐标系的几何对象,几何的坐标系必须相同;<br/>
包含标准如下:
点包含点的标准为:两个点几何坐标是否相等;<br/>
线包含线的标准为:一条线上的点都在另一条线上,或两条线的点坐标相同;<br/>
区包含线的标准为:线在区几何内,但线不全部在区几何边线上(包括内圈和外圈的边线);<br/>
区包含线的标准为:点在区几何内,不在边线上(包括内圈和外圈的边线);<br/>
区包含区的标准为:一个区在另一个区内(如果有带洞区域,则不能在带洞区域内,可以挨着边线),边线可以重合;<br/>
其他情况为上述标准的组合;<br/>
由于包含的情况太多,这里仅列举部分示例,示例如下:<br/>
<a href='#intersects1'>[1、区包含点]</a><br/>
<a href='#intersects2'>[2、多点包含点]</a><br/>
<a href='#intersects3'>[3、区包含线]</a><br/>
<a href='#intersects4'>[4、圆包含矩形]</a><br/>
<a href='#intersects5'>[5、几何包含 - 自定义坐标系]</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>containerGeometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

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

  <td class="description last"><p>包含几何对象</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

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

  <td class="description last"><p>被包含的几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line3946">line 3946</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">Boolean</span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='contains1'>区包含点</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, Point, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Polygon, Point } from "@mapgis/webclient-common"
// 初始点几何,可以是任意几何
const point = new Point({
  coordinates: [1, 1]
})
// 初始化区几何,可以是任意几何
const polygon = new Polygon({
  coordinates: [
    [
      [1, 0],
      [10, 0],
      [10, 20],
      [1, 20],
      [1, 0]
    ]
  ]
})
// 判断区几何是否包含点几何对象
const isContains = GeometryEngine.contains(polygon, point)
console.log("区是否包含点:", isContains)</code></pre>
    

        <p class="code-caption"><h5 id='contains2'>多点包含点</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiPoint, Point, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiPoint, Point, GeometryEngine } from "@mapgis/webclient-common"
// 初始点几何
const point = new Point({
  coordinates: [1, 1]
})
// 初始化多点几何
const multiPoint = new MultiPoint({
  coordinates: [
    [1, 1],
    [1, 2]
  ]
})
// 判断多点几何是否包含点几何对象
const isContains = GeometryEngine.contains(multiPoint, point)
console.log("多点是否包含点:", isContains)</code></pre>
    

        <p class="code-caption"><h5 id='contains3'>区包含线</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, LineString, GeometryEngine } from "@mapgis/webclient-common"
// 初始化区几何
const polygon = new Polygon({
  coordinates: [
    [
      [1, 0],
      [10, 0],
      [10, 20],
      [1, 20],
      [1, 0]
    ]
  ]
})
// 初始化线几何
const lineString = new LineString({
  coordinates: [
    [1, 0],
    [1, 6]
  ]
})
// 判断多点几何是否包含点几何对象
const isContains = GeometryEngine.contains(polygon, lineString)
console.log("区是否包含线:", isContains)</code></pre>
    

        <p class="code-caption"><h5 id='contains4'>圆包含矩形</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Circle, LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Circle, LineString, GeometryEngine } from "@mapgis/webclient-common"
// 初始化圆几何
const circle = new Circle({
  center: [5, 5],
  radius: 2
})
// 初始化矩几何
const extent = new Extent({
  xmin: 2,
  ymin: 2,
  xmax: 4,
  ymax: 4
})
// 判断多点几何是否包含点几何对象
const isContains = GeometryEngine.contains(circle, extent)
console.log("圆是否包含矩形:", isContains)</code></pre>
    

        <p class="code-caption"><h5 id='contains5'>几何包含 - 自定义坐标系</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, LineString, SpatialReference, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, LineString, SpatialReference, GeometryEngine } from "@mapgis/webclient-common"
// 初始化线几何对象
const line = new LineString({
  coordinates: [
    [60000, 3426025],
    [598545, 3426025]
  ],
  // 要设置坐标系
  spatialReference: new SpatialReference({
    wkid: 4547
  })
})
// 初始化区几何对象
const polygon = new Polygon({
  coordinates: [
    [
      [0, 3226025],
      [698545, 3226025],
      [698545, 3685076],
      [0, 3685076],
      [0, 3226025]
    ],
    [
      [100000, 3326025],
      [598545, 3326025],
      [598545, 3485076],
      [100000, 3485076],
      [100000, 3326025]
    ]
  ],
  // 要设置坐标系
  spatialReference: new SpatialReference({
    wkid: 4547
  })
})
// 判断多点几何是否包含点几何对象
const isContains = GeometryEngine.contains(circle, extent)
console.log("圆是否包含矩形:", isContains)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='crosses'></a>
判断一个几何对象是否穿过另一个几何对象;<br/>
要穿过的几何类型为:线、多线,忽略三维高度;<br/>
被穿过的几何类型为:线、多线、矩形、圆、区以及多区,忽略三维高度,穿线和被穿过几何的坐标系必须相同;<br/>
要穿过的几何与被穿过的几何(geometry1和geometry2)可以调换输入,但其中一个geometry必须是LineString、MultiLineString中的一类;<br/>
当被穿过的几何类型为MultiLineString、MultiPolygon时,只要MultiLineString和MultiPolygon中有一个要素被穿过,就算穿过,返回true;<br/>
当要穿过的几何类型为MultiLineString时,只要MultiLineString中有一条线穿过geometry2(被穿过的几何体),就算穿过,返回true;<br/>
如果两条线出现重叠,此种情况不算穿过,返回false;&lt;br/
如果两条线出现“入”型、“L”型,此种情况不算穿过,返回false;<br/>
线与圆相切的情况不算穿过,返回false;<br/>
线和多边形的一条边重叠,算穿过,返回true;<br/>
当polygon有内圈时,只要穿过外圈就算穿过,返回true;<br/>
示例如下:<br/>
<a href='#cross1'>[1、线穿过线]</a><br/>
<a href='#cross2'>[2、线穿过多线]</a><br/>
<a href='#cross3'>[3、线穿过区]</a><br/>
<a href='#cross4'>[4、多线穿过区]</a><br/>
<a href='#cross5'>[5、多线穿过多区]</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>geometry1</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>


  
  </td>

  

  <td class="description last"><p>第一个几何体,支持线、多线;</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>
|

<span class="param-type"><a href="Circle.html">Circle</a></span>
|

<span class="param-type"><a href="Extent.html">Extent</a></span>


  
  </td>

  

  <td class="description last"><p>第二个几何体,支持线、多线、面、多面、圆、矩形,两个参数可以调换输入,但其中一个geometry必须是LineString、MultiLineString中的一类;</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line5367">line 5367</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">Boolean</span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='cross1'>线穿过线</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造要穿过的线对象
const line1 = new LineString({
  coordinates: [
    [108.36341, 29.032578],
    [116.13094, 29.032578]
  ]
})
// 构造被穿过的线对象
const line2 = new LineString({
  coordinates: [
    [110, 28],
    [110, 30],
    [111, 30],
    [111, 28]
  ]
})
// 开始判断穿过
const cross = GeometryEngine.crosses(line1, line2)
console.log("线是否穿过线:", cross)</code></pre>
    

        <p class="code-caption"><h5 id='cross2'>线穿过多线</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, MultiLineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, MultiLineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造要穿过的线对象
const line1 = new LineString({
  coordinates: [
    [108.36341, 29.032578],
    [116.13094, 29.032578]
  ]
})
// 构造被穿过的多线对象
 const multiLineString = new MultiLineString({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578]
    ],
    [
      [108.36341, 29.332578],
      [116.13094, 29.332578]
    ]
  ]
})
// 开始判断穿过
const cross = GeometryEngine.crosses(line1, multiLineString)
console.log("线是否穿过多线:", cross)</code></pre>
    

        <p class="code-caption"><h5 id='cross3'>线穿过区</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造要穿过的线对象
const line = new LineString({
  coordinates: [
    [110, 28],
    [110, 34],
    [111, 34],
    [112, 28]
  ]
})
// 构造被穿过的区对象
const polygon = new Polygon({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578],
      [116.13094, 33.273224],
      [108.36341, 33.273224],
      [108.36341, 29.032578],
    ],
    [
      [109, 29.5],
      [112, 29.5],
      [112, 32],
      [109, 32],
      [109, 29.5],
    ]
  ]
})
// 开始判断穿过
const cross = GeometryEngine.crosses(line,polygon)
console.log("线是否穿过区:", cross)</code></pre>
    

        <p class="code-caption"><h5 id='cross4'>多线穿过区</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiLineString, Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造要穿过的多线对象
 const multiLineString = new MultiLineString({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578]
    ],
    [
      [108.36341, 29.332578],
      [116.13094, 29.332578]
    ]
  ]
})
// 构造被穿过的区对象
const polygon = new Polygon({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578],
      [116.13094, 33.273224],
      [108.36341, 33.273224],
      [108.36341, 29.032578],
    ],
    [
      [109, 29.5],
      [112, 29.5],
      [112, 32],
      [109, 32],
      [109, 29.5],
    ]
  ]
})
// 开始判断穿过
const cross = GeometryEngine.crosses( multiLineString,polygon)
console.log("多线是否穿过区:", cross)</code></pre>
    

        <p class="code-caption"><h5 id='cross5'>多线穿过多区</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString, MultiPolygon, SpatialReference, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiLineString, MultiPolygon, SpatialReference, GeometryEngine } from "@mapgis/webclient-common"
// 构造要穿过的多线对象
 const multiLineString = new MultiLineString({
  coordinates: [
    [
      [-49522.6942635386, 3226025.20474049],
      [707596.826929215, 3214754.20105]
    ],
    [
      [-47918.3624481045, 3259361.82328017],
      [707596.826929215, 3259361.82328017]
    ]
  ],
  // 必须指定坐标系
  spatialReference: new SpatialReference({
    wkid: 4547
  })
})
// 构造被穿过的多区
const multiPolygon = new MultiPolygon({
  coordinates: [
    [
      [
        [-47918.3624481045, 3214754.20105],
        [707596.826929215, 3214754.20105],
        [707596.826929215, 3685076.66188228],
        [-47918.3624481045, 3685076.66188228],
        [-47918.3624481045, 3214754.20105]
      ],
      [
        [14849.3479447439, 3275130.08942507],
        [310996.760637403, 3275130.08942507],
        [310996.760637403, 3543600.9315051],
        [14849.3479447439, 3543600.9315051],
        [14849.3479447439, 3275130.08942507],
      ]
    ],
    [
      [
        [813421.283605543, 3214754.20105],
        [1071620.19329204, 3214754.20105],
        [1071620.19329204, 3685076.66188228],
        [813421.283605543, 3685076.66188228],
        [813421.283605543, 3214754.20105]
      ]
    ]
  ],
  // 必须指定坐标系
  spatialReference: new SpatialReference({
    wkid: 4547
  })
})
// 开始判断穿过
const cross = GeometryEngine.crosses(multiLineString, multiPolygon)
console.log("多线是否穿过多区:", cross)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='cut'></a>
使用一条线来切割几何,将其分割为多个几何对象;<br/>
被切割的几何类型为:线、多线、区以及多区,忽略三维高度,切线和被切割几何的坐标系必须相同;<br/>
此接口不会像arcgis的geometryEngine.cut方法那样,返回切割线左右两边的几何对象数组,而是把所有的被切割好的几何组成一个数组并返回;<br/>
如果切割线和被切割几何没有相交,则会返回一个空数组;<br/>
线切割线会返回被切割后的线几何数组;<br/>
线切割多线仅会返回被切割后的线几何数组,如果多线中的某一个线段不与切割线相交,则不会返回该线段几何;<br/>
线切割区会返回被切割后的区几何数组,如果切线仅仅是部分和区相交,但是没有穿过几何,会返回一个仅包含该区几何对像的数组;<br/>
线切割多区仅会返回被切割后的区几何数组,如果多区中的某一个区不与切割线相交,则不会返回该区几何;<br/>
示例如下:<br/>
<a href='#cut1'>[1、线切割线]</a><br/>
<a href='#cut2'>[2、线切割多线]</a><br/>
<a href='#cut3'>[3、线切割区]</a><br/>
<a href='#cut4'>[4、线切割多区]</a><br/>
<a href='#cut5'>[5、几何切割 - 自定义坐标系]</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>geometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>
|

<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>


  
  </td>

  

  <td class="description last"><p>被切割的区对象</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="LineString.html">LineString</a></span>


  
  </td>

  

  <td class="description last"><p>切割线几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line6529">line 6529</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.&lt;<a href="Geometry.html">Geometry</a>></span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='cut1'>线切割线</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造被切割的线对象
const line = new LineString({
  coordinates: [
    [108.36341, 29.032578],
    [116.13094, 29.032578]
  ]
})
// 构造切割线对象
const cutter = new LineString({
  coordinates: [
    [110, 28],
    [110, 30],
    [111, 30],
    [111, 28]
  ]
})
// 开始切割线
const cut = GeometryEngine.cut(line, cutter)
console.log("切割后的几何数组:", cut)</code></pre>
    

        <p class="code-caption"><h5 id='cut2'>线切割多线</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, MultiLineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, MultiLineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造被切割的多线对象
const line = new MultiLineString({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578]
    ],
    [
      [108.36341, 29.332578],
      [116.13094, 29.332578]
    ]
  ]
})
// 构造切割线对象
const cutter = new LineString({
  coordinates: [
    [110, 28],
    [110, 30],
    [111, 30],
    [112, 28]
  ]
})
// 开始切割线
const cut = GeometryEngine.cut(line, cutter)
console.log("切割后的几何数组:", cut)</code></pre>
    

        <p class="code-caption"><h5 id='cut3'>线切割区</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造被切割的区对象
const polygon = new Polygon({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578],
      [116.13094, 33.273224],
      [108.36341, 33.273224],
      [108.36341, 29.032578],
    ],
    [
      [109, 29.5],
      [112, 29.5],
      [112, 32],
      [109, 32],
      [109, 29.5],
    ]
  ]
})
// 构造切割线对象
const cutter = new LineString({
  coordinates: [
    [110, 28],
    [110, 34],
    [111, 34],
    [112, 28]
  ]
})
// 开始切割区
const cut = GeometryEngine.cut(polygon, cutter)
console.log("切割后的几何数组:", cut)</code></pre>
    

        <p class="code-caption"><h5 id='cut4'>线切割多区</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, MultiPolygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, MultiPolygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造被切割的多区
const polygon = new MultiPolygon({
  coordinates: [
    [
      [
        [108.36341, 29.032578],
        [116.13094, 29.032578],
        [116.13094, 33.273224],
        [108.36341, 33.273224],
        [108.36341, 29.032578]
      ],
      [
        [109, 29.5],
        [112, 29.5],
        [112, 32],
        [109, 32],
        [109, 29.5],
      ]
    ],
    [
      [
        [117.36341, 29.032578],
        [120.13094, 29.032578],
        [120.13094, 33.273224],
        [117.36341, 33.273224],
        [117.36341, 29.032578]
      ]
    ]
  ]
})
// 构造切割线对象
const cutter = new LineString({
  coordinates: [
    [110, 28],
    [110, 34],
    [111, 34],
    [112, 28],
    [118, 28],
    [119, 34]
  ]
})
// 开始切割多区
const cut = GeometryEngine.cut(polygon, cutter)
console.log("切割后的几何数组:", cut)</code></pre>
    

        <p class="code-caption"><h5 id='cut5'>几何切割 - 自定义坐标系</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, Polygon, SpatialReference, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, Polygon, SpatialReference, GeometryEngine } from "@mapgis/webclient-common"
// 构造被切割的区对象
const polygon = new Polygon({
  coordinates: [
    [
      [0, 3226025],
      [698545, 3226025],
      [698545, 3685076],
      [0, 3685076],
      [0, 3226025]
    ],
    [
      [100000, 3326025],
      [598545, 3326025],
      [598545, 3485076],
      [100000, 3485076],
      [100000, 3326025]
    ]
  ],
  // 必须指定坐标系
  spatialReference: new SpatialReference({
    wkid: 4547
  })
})
// 构造切割线对象
const cutter = new LineString({
  coordinates: [
    [106372, 3104899],
    [130347, 3770883],
    [222797, 3767721],
    [303253, 3100054]
  ],
  // 必须指定坐标系
  spatialReference: new SpatialReference({
    wkid: 4547
  })
})
// 开始切割区
const cut = GeometryEngine.cut(polygon, cutter)
console.log("切割后的几何数组:", cut)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='difference'></a>
几何求差,即返回inputGeometry几何对象减去subtractGeometry几何对象之后的部分;<br/>
支持区、多区、矩形和圆形之间进行相互求差;<br/>
支持自定义坐标系几何,忽略三维高度;<br/>
求差后可能返回一个区几何或一个多区几何或者一个空对象;<br/>
由于示例太多,仅列举部分示例,示例如下:<br/>
<a href='#difference1'>[1、区和区求差]</a><br/>
<a href='#difference2'>[2、区和多区求差]</a><br/>
<a href='#difference3'>[3、多区和圆形求差]</a><br/>
<a href='#difference4'>[4、矩形和圆求差]</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>inputGeometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>
|

<span class="param-type"><a href="Extent.html">Extent</a></span>
|

<span class="param-type"><a href="Circle.html">Circle</a></span>


  
  </td>

  

  <td class="description last"><p>被求差几何对象</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>
|

<span class="param-type"><a href="Extent.html">Extent</a></span>
|

<span class="param-type"><a href="Circle.html">Circle</a></span>


  
  </td>

  

  <td class="description last"><p>求差几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line208">line 208</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="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='difference1'>区和区求差</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造第一个区
const polygon1 = new Polygon({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578],
      [116.13094, 33.273224],
      [108.36341, 33.273224],
      [108.36341, 29.032578]
    ]
  ]
})
// 构造第二个区
onst polygon2 = new Polygon({
  coordinates: [
    [
      [109.36341, 30.032578],
      [115.13094, 30.032578],
      [115.13094, 32.273224],
      [109.36341, 32.273224],
      [109.36341, 30.032578]
    ],
    [
      [110.36341, 31.032578],
      [114.13094, 31.032578],
      [114.13094, 31.5],
      [110.36341, 31.5],
      [110.36341, 31.032578]
    ]
  ]
})
// 开始求差
const geometry = GeometryEngine.difference(polygon1, polygon2)
console.log("区和区求差:", geometry)</code></pre>
    

        <p class="code-caption"><h5 id='difference2'>区和多区求差</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, MultiPolygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, MultiPolygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造第一个区
const polygon1 = new Polygon({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578],
      [116.13094, 33.273224],
      [108.36341, 33.273224],
      [108.36341, 29.032578]
    ]
  ]
})
// 构造第二个区
const polygon2 = new MultiPolygon({
  coordinates: [
    [
      [
        [109.36341, 30.032578],
        [110.13094, 30.032578],
        [110.13094, 32.273224],
        [109.36341, 32.273224],
        [109.36341, 30.032578]
      ]
    ],
    [
      [
        [111.36341, 30.032578],
        [112.13094, 30.032578],
        [112.13094, 32.273224],
        [111.36341, 32.273224],
        [111.36341, 30.032578]
      ]
    ]
  ]
})
// 开始求差
const geometry = GeometryEngine.difference(polygon1, polygon2)
console.log("区和多区求差:", geometry)</code></pre>
    

        <p class="code-caption"><h5 id='difference3'>多区和圆形求差</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiPolygon, Circle, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiPolygon, Circle,GeometryEngine } from "@mapgis/webclient-common"
// 构造多区几何
const polygon = new MultiPolygon({
  coordinates: [
    [
      [
        [108.36341, 29.032578],
        [110.13094, 29.032578],
        [110.13094, 33.273224],
        [108.36341, 33.273224],
        [108.36341, 29.032578]
      ]
    ],
    [
      [
        [111.36341, 29.032578],
        [116.13094, 29.032578],
        [116.13094, 33.273224],
        [111.36341, 33.273224],
        [111.36341, 29.032578]
      ]
    ]
  ]
})
// 构造圆几何
const circle = new Circle({
  center: [112.247175, 31.152901],
  radius: 2
})
// 开始求差
const geometry = GeometryEngine.difference(polygon, circle)
console.log("多区和圆求差:", geometry)</code></pre>
    

        <p class="code-caption"><h5 id='difference4'>矩形和圆求差</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Extent, Circle, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Extent, Circle,GeometryEngine } from "@mapgis/webclient-common"
// 构造矩形对象
const extent = new Extent({
  xmin: 108.36341,
  ymin: 29.032578,
  xmax: 116.13094,
  ymax: 33.273224
})
// 构造圆形对象
const circle = new Circle({
  center: [112.247175, 31.152901],
  radius: 2
})
// 开始求差
const geometry = GeometryEngine.difference(extent, circle)
console.log("矩形和圆求差:", geometry)</code></pre>
    


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


    
    <h4 class="name" id=".disjoint">
        <a class="href-link" href="#.disjoint">#</a>
        
            
                <span class='tag'>static</span>
            
        
        <span class="code-name" style="font-size:30px">
            
                disjoint<span class="signature">(geometry1<span class="signature-attributes">opt</span>, geometry2<span class="signature-attributes">opt</span>)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p><a id='disjoint'></a>
判断两个几何是否相离,即完全不相交;<br/>
支持自定义坐标系几何对象,两个几何对象的坐标系要一致,忽略三维高度;<br/>
示例如下:<br/>
<a href='#disjoint1'>[是否相离]</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>geometry1</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

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

  <td class="description last"><p>第一个几何对象</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

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

  <td class="description last"><p>第二个几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line5114">line 5114</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">Boolean</span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='disjoint1'>是否相离</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造线几何对象
const line = new LineString({
  coordinates: [
    [113, 28],
    [113, 34]
  ]
})
// 构造区几何对象
const polygon = new Polygon({
  coordinates: [
    [
      [108, 30],
      [115, 30],
      [115, 33],
      [108, 33],
      [108, 30]
    ],
    [
      [110, 31],
      [113, 31],
      [113, 32],
      [110, 32],
      [110, 31]
    ]
  ]
})
// 开始求交
const isIntersect = GeometryEngine.disjoint(line, polygon)
console.log("是否相离:", isIntersect)</code></pre>
    


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


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

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

  <td class="type">
  
      
<span class="param-type"><a href="Point.html">Point</a></span>


  
  </td>

  

  <td class="description last"><p>第一个几何体,需为point</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Point.html">Point</a></span>
|

<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPoint.html">MultiPoint</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>
|

<span class="param-type"><a href="Circle.html">Circle</a></span>
|

<span class="param-type"><a href="Extent.html">Extent</a></span>


  
  </td>

  

  <td class="description last"><p>第二个几何体,可以为点、多点、线、多线、面、多面、圆、矩形</p></td>
</tr>



        

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

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


  
  </td>

  

  <td class="description last"><p>单位,默认为&quot;kilometers&quot;</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line4705">line 4705</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>






    <h5>示例</h5>
    
        <p class="code-caption"><h5>点和点求距离</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Point } from "@mapgis/webclient-common"
// 点和点求距离
const point1 = new Point({
  coordinates: [1, 1]
})
const point2 = new Point({
  coordinates: [2, 1]
})
// 可以不传递单位,不传递时默认单位为 "kilometers"
const pointDistance = GeometryEngine.distance(point1, point2);
console.log("点和点求距离:", pointDistance)
// 可以传单位,如传入单位 'miles'
const pointDistance2 = GeometryEngine.distance(point1, point2, "miles")
console.log("点和点求距离(设置单位为"miles"):", pointDistance)</code></pre>
    

        <p class="code-caption"><h5>点和线求距离</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Point, LineString } from "@mapgis/webclient-common"
// 点和线求距离
const point1 = new Point({
  coordinates: [100.0, 100.0]
})
const lineString = new LineString({
  coordinates: [
       [100.0, 200.0],
       [101.0, 201.0],
       [103.0, 203.0],
     ],
})
const pointToLineDistance = GeometryEngine.distance(point1, lineString);
console.log("点和线求距离:", pointToLineDistance)</code></pre>
    

        <p class="code-caption"><h5>点和面求距离</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Point, Polygon } from "@mapgis/webclient-common"
// 点和面求距离
const point1 = new Point({
  coordinates: [100.0, 100.0]
})
const polygon = new Polygon({
   coordinates: [
     [
       [100.0, 0.0],
       [101.0, 0.0],
       [101.0, 1.0],
       [100.0, 1.0],
       [100.0, 0.0],
     ],
   ],
 });
const pointToPolygonDistance = GeometryEngine.distance(point1, polygon);
console.log("点和面求距离:", pointToPolygonDistance)</code></pre>
    


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


    
    <h4 class="name" id=".equals">
        <a class="href-link" href="#.equals">#</a>
        
            
                <span class='tag'>static</span>
            
        
        <span class="code-name" style="font-size:30px">
            
                equals<span class="signature">(geometry1<span class="signature-attributes">opt</span>, geometry2<span class="signature-attributes">opt</span>)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p><a id='equals'></a>
判断两个几何是否相等;<br/>
使用如下判断标准:<br/>
1、类型是否相等;<br/>
2、坐标系是否相等;<br/>
3、两个几何的坐标点是否相等;<br/>
支持任意几何类型;<br/></p>
    </div>
    









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

            <th>类型</th>

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

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

        <tbody>
        

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

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

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

  <td class="description last"><p>第一个几何对象</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

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

  <td class="description last"><p>第二个几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line4889">line 4889</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">Boolean</span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5>判断几何是否相等</h5></p>
    
    
        <pre class="prettyprint"><code>const isEquals = GeometryEngine.equals(new Point({
  coordinates: [1, 10]
}), new Point({
  coordinates: [1, 10]
}))
console.log("点和点是否相同:", isEquals)</code></pre>
    


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


    
    <h4 class="name" id=".geodesicLength">
        <a class="href-link" href="#.geodesicLength">#</a>
        
            
                <span class='tag'>static</span>
            
        
        <span class="code-name" style="font-size:30px">
            
                geodesicLength<span class="signature">(geometry<span class="signature-attributes">opt</span>, unit<span class="signature-attributes">opt</span>)</span>
            
        </span>
    </h4>
    

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

  <td class="type">
  
      
<span class="param-type"><a href="LineString.html">LineString</a></span>


  
  </td>

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

  <td class="description last"><p>几何对象</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="global.html#LengthUnit">LengthUnit</a></span>


  
  </td>

  
      <td class="default">
      
          LengthUnit.meter
      
      </td>
  

  <td class="description last"><p>单位,默认米</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line1549">line 1549</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=".getAngleFromPoints">
        <a class="href-link" href="#.getAngleFromPoints">#</a>
        
            
                <span class='tag'>static</span>
            
        
        <span class="code-name" style="font-size:30px">
            
                getAngleFromPoints<span class="signature">(pointA, pointB, pointC)</span>
            
        </span>
    </h4>
    

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

  <td class="type">
  
      
<span class="param-type">Array.&lt;Number></span>


  
  </td>

  

  <td class="description last"><p>第一个点</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type">Array.&lt;Number></span>


  
  </td>

  

  <td class="description last"><p>第二个点</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type">Array.&lt;Number></span>


  
  </td>

  

  <td class="description last"><p>第三个点</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line7619">line 7619</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>






    <h5>示例</h5>
    
        <p class="code-caption"><h5>计算三点之间的夹角</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine } from "@mapgis/webclient-common"
// 计算三点之间的夹角
const angle = GeometryEngine.getAngleFromPoints([1, 2], [1, 1], [2, 1])</code></pre>
    


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


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

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

  <td class="type">
  
      
<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>
|

<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>


  
  </td>

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

  <td class="description last"><p>带三点弧段数据的几何对象</p></td>
</tr>


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

  <td class="type">
  
      
<span class="param-type">Array.&lt;Object></span>


  
  </td>

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

  <td class="description last"><p>弧段信息参数</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>弧段中点的数量,注意这个是圆弧的数量,意思是将圆分成360份,如果这个弧段的度数为120度,则有
360 * (120/360) = 120段</p></td>
</tr>


  



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line7699">line 7699</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="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>
|

<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5>通过几何中的三点弧段数据,构造离散后的几何对象</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, SpatialReference, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, SpatialReference, GeometryEngine } from "@mapgis/webclient-common"
// 构造一个线几何,其他几何对象同线几何对象
const line = new LineString({
  // 几何坐标点
  coordinates:  [
        [
          64.15012768690451,
          89.23584703643573
        ],
        [
          85.69715379735212,
          62.63186581843408
        ],
        [
          92.51304981188144,
          62.851733431806025
        ],
        [
          92.51304981188144,
          62.851733431806025
        ],
        [
          64.15012768690451,
          89.23584703643573
        ]
   ],
  // 几何的参考系,默认是4326,非4326坐标系请指定参考系
  spatialReference: new SpatialReference('EPSG:4326')
})
// 通过几何中的三点弧段数据,构造离散后的几何对象
const arcLine = GeometryEngine.getArcFromGeometry({
  // 几何对象
  geometry: line,
  // 弧段信息参数,必填项
  arcInfo: [
    {
      "centerPointIndex": 1,
      "ringIndex": 0
    }
  ],
  // 弧段中点的数量
  numberOfPoints: 360
})</code></pre>
    


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


    
    <h4 class="name" id=".getCenter">
        <a class="href-link" href="#.getCenter">#</a>
        
            
                <span class='tag'>static</span>
            
        
        <span class="code-name" style="font-size:30px">
            
                getCenter<span class="signature">(point1, point2, point3, hasZ)</span>
            
        </span>
    </h4>
    

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

  <td class="type">
  
      
<span class="param-type">Array.&lt;Number></span>


  
  </td>

  

  <td class="description last"><p>第一个点坐标</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type">Array.&lt;Number></span>


  
  </td>

  

  <td class="description last"><p>第二个点坐标</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type">Array.&lt;Number></span>


  
  </td>

  

  <td class="description last"><p>第三个点坐标</p></td>
</tr>



        

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

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


  
  </td>

  

  <td class="description last"><p>是否含有z值</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line7388">line 7388</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.&lt;Number></span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5>通过三个点求圆心</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine } from "@mapgis/webclient-common"
// 计算圆心
const center = GeometryEngine.getCenter([1, 2], [2, 1], [1, 0])</code></pre>
    


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


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

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

  <td class="type">
  
      
<span class="param-type"><a href="Point.html">Point</a></span>
|

<span class="param-type">Array.&lt;Number></span>


  
  </td>

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

  <td class="description last"><p>弧段上的第一个点,弧段的起点</p></td>
</tr>


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

  <td class="type">
  
      
<span class="param-type"><a href="Point.html">Point</a></span>
|

<span class="param-type">Array.&lt;Number></span>


  
  </td>

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

  <td class="description last"><p>弧段上的第二个点,弧段穿过的点</p></td>
</tr>


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

  <td class="type">
  
      
<span class="param-type"><a href="Point.html">Point</a></span>
|

<span class="param-type">Array.&lt;Number></span>


  
  </td>

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

  <td class="description last"><p>弧段上的第三个点,弧段的终点</p></td>
</tr>


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

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


  
  </td>

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

  <td class="description last"><p>弧段中点的数量,注意这个是圆弧的数量,意思是将圆分成360份,如果这个弧段的度数为120度,则有
360 * (120/360) = 120段</p></td>
</tr>


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

  <td class="type">
  
      
<span class="param-type"><a href="SpatialReference.html">SpatialReference</a></span>


  
  </td>

  
      <td class="default">
      
          new Zondy.SpatialReference('EPSG:4326')
      
      </td>
  

  <td class="description last"><p>几何点的空间参考系,默认4326,当不是4326时请指定坐标系,方便进行投影转换,参考示例:<a href='#SpatialReference'>[指定坐标系]</a></p></td>
</tr>


  



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line7239">line 7239</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"><h5>通过三点弧段构造一组离散的点坐标</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { SpatialReference, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { SpatialReference, GeometryEngine } from "@mapgis/webclient-common"
// 将弧段打散为离散点
const arc3Path = GeometryEngine.getPositionsFromArc({
  // 弧段上的第一个点,弧段的起点
  point1: [1, 2],
  // 弧段上的第二个点,弧段穿过的点
  point2: [2, 1],
  // 弧段上的第二个点,弧段的终点
  point3: [1, 0],
  // 弧段中点的数量
  numberOfPoints: 360,
  // 弧段的参考系,默认是4326,非4326坐标系请指定参考系
  spatialReference: new SpatialReference('EPSG:4326')
})</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='intersect'></a>
计算并返回两个几何对象的相交部分;<br/>
支持任意几何或几何对象数组和另一个几何进行相交,忽略三维高度,坐标系必须相同;<br/>
点和任何几何相交返回点或空对象<br/>
多点和任何几何相交返回点或多点或空对象<br/>
线和任意几何对象相交返回相交点或重叠线或相交点和重叠线或空对象<br/>
区和区、区和多区相交返回区或多区或空对象<br/>
矩形、圆、区、多区之间相交返回区或多区或空对象<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>geometry1</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>
|

<span class="param-type">Array.&lt;<a href="Geometry.html">Geometry</a>></span>


  
  </td>

  

  <td class="description last"><p>第一个几何对象或几何对象数组</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

  

  <td class="description last"><p>第二个几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line1807">line 1807</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="Geometry.html">Geometry</a></span>
|

<span class="param-type">Array.&lt;<a href="Geometry.html">Geometry</a>></span>


    </div>
    
</div>

                
        </div>
    </div>






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


    
    <h4 class="name" id=".intersects">
        <a class="href-link" href="#.intersects">#</a>
        
            
                <span class='tag'>static</span>
            
        
        <span class="code-name" style="font-size:30px">
            
                intersects<span class="signature">(geometry1<span class="signature-attributes">opt</span>, geometry2<span class="signature-attributes">opt</span>)</span>
            
        </span>
    </h4>
    

    
    <div class="description">
        <p><a id='intersects'></a>
判断两个几何对象是否相交;<br/>
支持任意几何类型求交;<br/>
支持自定义坐标系的几何对象,两个求交几何的坐标系必须相同,忽略三位高度;<br/>
由于示例太多,这里仅列举部分示例,示例如下:<br/>
<a href='#intersects1'>[1、线和区求交]</a><br/>
<a href='#intersects2'>[2、点和区求交]</a><br/>
<a href='#intersects3'>[3、区和多区求交]</a><br/>
<a href='#intersects4'>[4、矩形和圆形求交]</a><br/>
<a href='#intersects5'>[5、几何求交 - 自定义参考系]</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>geometry1</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

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

  <td class="description last"><p>求交的几何对象</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

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

  <td class="description last"><p>求交的几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line1530">line 1530</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">Boolean</span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='intersects1'>线和区求交</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造线几何对象
const line = new LineString({
  coordinates: [
    [113, 28],
    [113, 34]
  ]
})
// 构造区几何对象
const polygon = new Polygon({
  coordinates: [
    [
      [108, 30],
      [115, 30],
      [115, 33],
      [108, 33],
      [108, 30]
    ],
    [
      [110, 31],
      [113, 31],
      [113, 32],
      [110, 32],
      [110, 31]
    ]
  ]
})
// 开始求交
const isIntersect = GeometryEngine.intersects(line, polygon)
console.log("是否相交:", isIntersect)</code></pre>
    

        <p class="code-caption"><h5 id='intersects2'>点和区求交</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Point, Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造点几何对象
const point = new Point({
  coordinates: [112, 32]
})
// 构造区几何对象
const polygon = new Polygon({
  coordinates: [
    [
      [108, 30],
      [115, 30],
      [115, 33],
      [108, 33],
      [108, 30]
    ]
  ]
})
// 开始求交
const isIntersect = GeometryEngine.intersects(point, polygon)
console.log("是否相交:", isIntersect)</code></pre>
    

        <p class="code-caption"><h5 id='intersects3'>区和多区求交</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, MultiPolygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, MultiPolygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造区几何对象
const polygon1 = new Polygon({
  coordinates: [
    [
      [108, 32],
      [112, 32],
      [112, 34],
      [108, 34],
      [108, 32]
    ]
  ]
})
// 构造多区几何对象
const polygon2 = new MultiPolygon({
  coordinates: [
    [
      [
        [108, 33],
        [112, 33],
        [112, 35],
        [108, 35],
        [108, 33]
      ]
    ],
    [
      [
        [114, 32],
        [115, 32],
        [115, 34],
        [114, 34],
        [114, 32]
      ]
    ]
  ]
})
// 开始求交
const isIntersect = GeometryEngine.intersects(polygon1, polygon2)
console.log("是否相交:", isIntersect)</code></pre>
    

        <p class="code-caption"><h5 id='intersects4'>矩形和圆形求交</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Extent, Circle, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Extent, Circle, GeometryEngine } from "@mapgis/webclient-common"
// 构造矩形几何对象
const extent = new Extent({
  xmin: 108,
  ymin: 33,
  xmax: 115,
  ymax: 34
})
// 构造圆形几何对象
const circle = new Circle({
  center: [113, 32],
  radius: 4
})
// 开始求交
const isIntersect = GeometryEngine.intersects(extent, circle)
console.log("是否相交:", isIntersect)</code></pre>
    

        <p class="code-caption"><h5 id='intersects5'>几何求交 - 自定义参考系</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, Circle, SpatialReference, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, Circle, SpatialReference, GeometryEngine } from "@mapgis/webclient-common"
// 构造区几何对象
const polygon = new Polygon({
  coordinates: [
    [
      [0, 3226025],
      [698545, 3226025],
      [698545, 3685076],
      [0, 3685076],
      [0, 3226025]
    ],
    [
      [100000, 3326025],
      [598545, 3326025],
      [598545, 3485076],
      [100000, 3485076],
      [100000, 3326025]
    ]
  ],
  // 此处要指定坐标系
  spatialReference: new SpatialReference({
    wkid: 4547
  })
})
// 构造圆几何对象
const circle = new Circle({
  center: [245257.10778559791, 3212885.1836444484],
  radius: 400000,
  // 此处要指定坐标系
  spatialReference: new SpatialReference({
    wkid: 4547
  })
})
// 开始求交
const isIntersect = GeometryEngine.intersects(circle, polygon)
console.log("是否相交:", isIntersect)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='isSimple'></a>
对几何对象进行拓扑检查;<br/>
支持的几何类型为线、多线、区和多区,支持任意坐标系几何,忽略三维高度;<br/>
线类型的标准为:1、自身的非相邻线段不会自相交(两个线段仅有一个端点重叠不算相交);2、线自身的线段不会重叠;<br/>
多线类型的标准为:1、自身的子线段必须是拓扑正确的;2、子线段不会相交;<br/>
区类型的标准为:1、外圈和内圈满足线类型的拓扑检查标准;2、外圈和内圈、内圈和内圈不会相交;3、内圈不会超过外圈;<br/>
多区类型的标准为:1、自身的子区必须是拓扑正确的;2、子区不会相交;<br/>
示例如下:<br/>
<a href='#isSimple1'>[1、对线几何进行拓扑检查]</a><br/>
<a href='#isSimple2'>[2、对多线几何进行拓扑检查]</a><br/>
<a href='#isSimple3'>[3、对区几何进行拓扑检查]</a><br/>
<a href='#isSimple4'>[4、对多区几何进行拓扑检查]</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>geometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>
|

<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>


  
  </td>

  

  <td class="description last"><p>几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line7004">line 7004</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">Boolean</span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='isSimple1'>对线几何进行拓扑检查</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造线几何对象
const line = new LineString({
  coordinates: [
    [108.36341, 29.032578],
    [116.13094, 29.032578],
    [112.13094, 33.273224],
    [112.13094, 28.273224]
  ]
})
// 对线几何进行拓扑检查
const isSimple = GeometryEngine.isSimple(line)
console.log("是否通过检查:", isSimple)</code></pre>
    

        <p class="code-caption"><h5 id='isSimple2'>对多线几何进行拓扑检查</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiLineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造多线几何对象
const line = new MultiLineString({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578]
    ],
    [
      [112.13094, 33.273224],
      [112.13094, 28.273224]
    ]
  ]
})
// 对多线几何进行拓扑检查
const isSimple = GeometryEngine.isSimple(line)
console.log("是否通过检查:", isSimple)</code></pre>
    

        <p class="code-caption"><h5 id='isSimple3'>对区几何进行拓扑检查</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造区几何对象
const polygon = new Polygon({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578],
      [112.13094, 33.273224],
      [112.13094, 28.273224],
      [108.36341, 29.032578]
    ]
  ]
})
// 对区几何进行拓扑检查
const isSimple = GeometryEngine.isSimple(polygon)
console.log("是否通过检查:", isSimple)</code></pre>
    

        <p class="code-caption"><h5 id='isSimple4'>对多区几何进行拓扑检查</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造多区几何对象
const multiPolygon = new MultiPolygon({
  coordinates: [
    [
      [
        [108.36341, 29.032578],
        [112.13094, 29.032578],
        [112.13094, 33.273224],
        [108.36341, 33.273224],
        [108.36341, 29.032578]
      ]
    ],
    [
      [
        [112.13094, 29.032578],
        [114.13094, 29.032578],
        [114.13094, 33.273224],
        [112.13094, 33.273224],
        [112.13094, 29.032578]
      ]
    ]
  ]
})
// 对区几何进行拓扑检查
const isSimple = GeometryEngine.isSimple(multiPolygon)
console.log("是否通过检查:", isSimple)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='nearestCoordinate'></a>
在几何对象的coordinates中寻找与指定点距离最近的点</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>geometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPoint.html">MultiPoint</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>
|

<span class="param-type"><a href="Circle.html">Circle</a></span>
|

<span class="param-type"><a href="Extent.html">Extent</a></span>


  
  </td>

  

  <td class="description last"><p>几何对象,支持多点、线、多线、面、多面、圆、矩形</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Point.html">Point</a></span>


  
  </td>

  

  <td class="description last"><p>指定点,需为point</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line3266">line 3266</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>
<ul>
<li>@example <caption><h5>多点到目标点最近点</h5></caption>
// ES5引入方式
const { Point, MultiPoint, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, MultiPoint, Point } from &quot;@mapgis/webclient-common&quot;
// inputPoint
const inputPoint = new Point({
coordinates: [108, 28],
});
// geometry  MultiPoint
const multiPoint = new MultiPoint({
coordinates: [
[110, 20],
[109, 19],
],
});
// 多点到目标点最近点
const pointToMultiPoint = GeometryEngine.nearestCoordinate(
multiPoint,
inputPoint
);
console.log(&quot;多点到目标点最近点:&quot;, pointToMultiPoint);</li>
</ul></div>
    
    
    <div class='column is-5 has-text-left'>
        <label>类型: </label>
        
<span class="param-type">Project.&lt;<a href="Point.html">Point</a>></span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5>线到目标点最近点</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Point, LineString } from "@mapgis/webclient-common"
// inputPoint
 const inputPoint = new Point({
   coordinates: [112, 30],
 });
 // geometry  lineString
 const lineString = new LineString({
   coordinates: [
     [108, 32],
     [115, 32],
   ],
 });
 // 线到目标点最近点
 const pointToLineString = GeometryEngine.nearestCoordinate(
   lineString,
   inputPoint
 );
 console.log("线到目标点最近点:", pointToLineString);</code></pre>
    

        <p class="code-caption"><h5>区到目标点最近点</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Point, Polygon } from "@mapgis/webclient-common"
// inputPoint
 const inputPoint = new Point({
   coordinates: [100, 30],
 });
 // geometry  Polygon
 const polygon = new Polygon({
   coordinates: [
     [
       [105.0, 35.0],
       [110.0, 35.0],
       [110.0, 36.0],
       [105.0, 36.0],
       [105.0, 35.0],
     ],
   ],
 });
 // 区到目标点最近点
 const pointToPolygon = GeometryEngine.nearestCoordinate(
   polygon,
   inputPoint
 );
 console.log("区到目标点最近点:", pointToPolygon);</code></pre>
    


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


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

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

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

  

  <td class="description last"><p>第一个几何对象</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

  

  <td class="description last"><p>第二个几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line2825">line 2825</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">Boolean</span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5>几何是否重叠</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造线几何对象
const line = new LineString({
  coordinates: [
    [113, 28],
    [113, 34]
  ]
})
// 构造区几何对象
const polygon = new Polygon({
  coordinates: [
    [
      [108, 30],
      [115, 30],
      [115, 33],
      [108, 33],
      [108, 30]
    ],
    [
      [110, 31],
      [113, 31],
      [113, 32],
      [110, 32],
      [110, 31]
    ]
  ]
})
// 开始计算是否重叠
const isIntersect = GeometryEngine.overlaps(line, polygon)
console.log("是否重叠:", isIntersect)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='planarArea'></a>
计算几何对象的面积;<br/>
仅计算平面面积,忽略地球弧度,当坐标系为WGS84相关坐标系时,也仅会计算平面面积,例如坐标为[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]的区几何的面积为1;<br/>
支持自定义坐标系,忽略三维高度;<br/>
支持区、多区、矩形和圆形几何对象;<br/>
当为区或多区几何对象时,若该区带洞或多区的子区带洞,则会减去这些洞的面积;<br/>
示例如下:<br/>
<a href='#planarArea1'>[1、计算区(不带洞)面积]</a><br/>
<a href='#planarArea2'>[2、计算区(带洞)面积]</a><br/>
<a href='#planarArea3'>[3、计算多区面积]</a><br/>
<a href='#planarArea4'>[4、计算圆面积]</a><br/>
<a href='#planarArea5'>[5、计算矩形面积]</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>geometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>
|

<span class="param-type"><a href="Circle.html">Circle</a></span>
|

<span class="param-type"><a href="Extent.html">Extent</a></span>


  
  </td>

  

  <td class="description last"><p>计算面积的几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line3549">line 3549</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>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='planarArea1'>计算区(不带洞)面积</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Polygon, LengthUnit } from "@mapgis/webclient-common"
// 初始化区几何
const polygon = new Polygon({
  coordinates: [
      [
          [100, 30],
          [110, 30],
          [110, 40],
          [100, 40],
          [100, 30]
      ]
  ]
})
// 计算区几何面积
const area = GeometryEngine.planarArea(polygon)</code></pre>
    

        <p class="code-caption"><h5 id='planarArea2'>计算区(带洞)面积</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Polygon, LengthUnit } from "@mapgis/webclient-common"
// 初始化区几何 - 带洞
const polygon = new Polygon({
  coordinates: [
    [
      [0, 30],
      [140, 30],
      [140, 40],
      [0, 40],
      [0, 30]
    ],
    [
      [10, 30],
      [20, 30],
      [20, 40],
      [10, 40],
      [10, 30]
    ],
    [
      [30, 30],
      [40, 30],
      [40, 40],
      [30, 40],
      [30, 30]
    ]
  ]
})
// 计算区几何面积
const area = GeometryEngine.planarArea(polygon)</code></pre>
    

        <p class="code-caption"><h5 id='planarArea3'>计算多区面积</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiPolygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, MultiPolygon, LengthUnit } from "@mapgis/webclient-common"
//多区几何
const multiPolygon = new MultiPolygon({
  coordinates: [
      [
        [
          [10, 30],
          [20, 30],
          [20, 40],
          [10, 40],
          [10, 30]
        ]
      ],
      [
        [
          [30, 30],
          [40, 30],
          [40, 40],
          [30, 40],
          [30, 30]
        ]
      ]
  ]
})
// 计算区几何面积
const Area = GeometryEngine.planarArea(multiPolygon)</code></pre>
    

        <p class="code-caption"><h5 id='planarArea4'>计算圆面积</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Circle, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Circle, LengthUnit, GeometryEngine } from "@mapgis/webclient-common"
//圆几何
const circle = new Circle({
  center: [0, 0],
  radius: 10
})
// 计算圆几何面积
const area = GeometryEngine.planarArea(circle)</code></pre>
    

        <p class="code-caption"><h5 id='planarArea5'>计算矩形面积</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Extent, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Extent, LengthUnit, GeometryEngine } from "@mapgis/webclient-common"
//矩形几何
const extent = new Extent({
  xmin: 0,
  ymin: 0,
  xmax: 2,
  ymax: 2
})
// 计算矩形几何面积
const area = GeometryEngine.planarArea(extent)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='planarLength'></a>
计算几何长度或周长;<br/>
仅计算平面距离,忽略地球弧度,当坐标系为WGS84相关坐标系时,也仅会计算平面距离,例如坐标为[[0, 0], [0, 1]]的线几何的长度为1;<br/>
支持自定义坐标系,忽略三维高度;<br/>
支持的几何类型为线、多线、区、多区、圆形以及矩形;<br/>
当几何为线时,返回线的长度;<br/>
当几何为多线时,返回多线中子线的长度之和;<br/>
当几何为区、圆形以及矩形时,返回其周长;<br/>
当几何为多区时,返回多区中子区的周长之和;<br/>
示例如下:<br/>
<a href='#planarLength1'>[1、计算几何长度]</a><br/>
<a href='#planarLength2'>[2、计算几何周长]</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>geometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>
|

<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>
|

<span class="param-type"><a href="Circle.html">Circle</a></span>
|

<span class="param-type"><a href="Extent.html">Extent</a></span>


  
  </td>

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

  <td class="description last"><p>几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line3678">line 3678</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>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='planarLength1'>计算几何长度</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, GeometryEngine } from "@mapgis/webclient-common"
// 初始化一个线对象
const line = new LineString({
  coordinates: [
    [0, 1],
    [0, 2]
  ]
})
// 计算几何长度
const length = GeometryEngine.planarLength(line)</code></pre>
    

        <p class="code-caption"><h5 id='planarLength2'>计算几何周长</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 初始化一个区对象
const polygon = new Polygon({
  coordinates: [
    [
      [0, 0],
      [0, 1],
      [1, 1],
      [0, 1],
      [0, 0]
    ]
  ]
})
// 计算几何周长
const length = GeometryEngine.planarLength(polygon)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='rotate'></a>
顺时针旋转几何,支持所有基础几何对象;<br/>
可以指定旋转中心点,当不指定时使用几何质心;<br/>
忽略三维高度;<br/>
支持自定义坐标系几何,几何对象与旋转中心点的坐标系必须一致;<br/>
示例如下:<br/>
<a href='#rotate1'>[1、旋转多点]</a><br/>
<a href='#rotate2'>[2、旋转区]</a><br/>
<a href='#rotate3'>[3、旋转多区]</a><br/>
<a href='#rotate4'>[4、旋转线]</a><br/>
<a href='#rotate5'>[5、旋转多线]</a><br/>
<a href='#rotate6'>[6、旋转矩形]</a><br/>
<a href='#rotate7'>[7、旋转圆形]</a><br/>
<a href='#rotate8'>[8、旋转区 - 自定义坐标系]</a><br/>
<a href='#rotate9'>[9、绕点旋转 - 区]</a><br/>
<a href='#rotate10'>[10、绕点旋转 - 点]</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>geometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

  

  <td class="description last"><p>被旋转的几何对象</p></td>
</tr>



        

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

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


  
  </td>

  

  <td class="description last"><p>旋转角度,单位度,顺时针旋转</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Point.html">Point</a></span>


  
  </td>

  

  <td class="description last"><p>旋转中心点,默认为几何质心</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line3066">line 3066</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="Geometry.html">Geometry</a></span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='rotate1'>旋转多点</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiPoint, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiPoint, GeometryEngine } from "@mapgis/webclient-common"
// 构造多点几何
const multiPoint = new MultiPoint({
  coordinates: [
    [108.36341, 29.032578],
    [112.13094, 29.032578],
    [112.13094, 33.273224]
  ]
})
// 执行旋转操作
const rotateGeometry = GeometryEngine.rotate(multiPoint, 10)</code></pre>
    

    
        <pre class="prettyprint"><code>&lt;caption id='rotate2'>&lt;h5>旋转区&lt;/h5>&lt;/caption>
// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造区几何
const polygon = new Polygon({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578],
      [116.13094, 33.273224],
      [108.36341, 33.273224],
      [108.36341, 29.032578],
    ]
  ]
})
// 执行旋转操作
const rotateGeometry = GeometryEngine.rotate(polygon, 10)</code></pre>
    

        <p class="code-caption"><h5 id='rotate3'>旋转多区</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiPolygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiPolygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造多区几何
const polygon = new MultiPolygon({
  coordinates: [
    [
      [
        [108.36341, 29.032578],
        [112.13094, 29.032578],
        [112.13094, 33.273224],
        [108.36341, 33.273224],
        [108.36341, 29.032578],
      ]
    ],
    [
      [
        [113.36341, 29.032578],
        [116.13094, 29.032578],
        [116.13094, 33.273224],
        [113.36341, 33.273224],
        [113.36341, 29.032578],
      ]
    ]
  ]
})
// 执行旋转操作
const rotateGeometry = GeometryEngine.rotate(polygon, 10)</code></pre>
    

        <p class="code-caption"><h5 id='rotate4'>旋转线</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造线几何
const line = new LineString({
  coordinates: [
    [108.36341, 29.032578],
    [116.13094, 29.032578],
    [116.13094, 33.273224],
    [108.36341, 33.273224]
  ]
})
// 执行旋转操作
const rotateGeometry = GeometryEngine.rotate(line, 10)</code></pre>
    

        <p class="code-caption"><h5 id='rotate5'>旋转多线</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiLineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiLineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造多线几何
const line = new MultiLineString({
  coordinates: [
    [
      [108.36341, 29.032578],
      [116.13094, 29.032578]
    ],
    [
      [116.13094, 33.273224],
      [108.36341, 33.273224]
    ]
  ]
})
// 执行旋转操作
const rotateGeometry = GeometryEngine.rotate(line, 10)</code></pre>
    

        <p class="code-caption"><h5 id='rotate6'>旋转矩形</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Extent, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Extent, GeometryEngine } from "@mapgis/webclient-common"
// 构造矩形几何
const extent = new Extent({
  xmin: 108.36341,
  ymin: 29.032578,
  xmax: 112.13094,
  ymax: 33.273224
})
// 执行旋转操作
const rotateGeometry = GeometryEngine.rotate(extent, 10)</code></pre>
    

        <p class="code-caption"><h5 id='rotate7'>旋转圆形</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Circle, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Circle, GeometryEngine } from "@mapgis/webclient-common"
// 构造圆形几何
const circle = new Circle({
  center: [108.36341, 29.032578],
  radius: 3
})
// 执行旋转操作
const rotateGeometry = GeometryEngine.rotate(circle, 10)</code></pre>
    

        <p class="code-caption"><h5 id='rotate8'>旋转区 - 自定义坐标系</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, SpatialReference, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, SpatialReference, GeometryEngine } from "@mapgis/webclient-common"
// 构造区几何
const polygon = new Polygon({
 coordinates: [
   [
     [0, 3226025],
     [698545, 3226025],
     [698545, 3685076],
     [0, 3685076],
     [0, 3226025]
   ]
 ],
 // 一定要指定坐标系
 spatialReference: new SpatialReference({
   wkid: 4547
 })
})
// 执行旋转操作
const rotateGeometry = GeometryEngine.rotate(polygon, 10)</code></pre>
    

        <p class="code-caption"><h5 id='rotate9'>绕点旋转 - 区</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, Point, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Polygon, Point, GeometryEngine } from "@mapgis/webclient-common"
// 构造区几何
const polygon = new Polygon({
 coordinates: [
   [
     [108.36341, 29.032578],
     [116.13094, 29.032578],
     [116.13094, 33.273224],
     [108.36341, 33.273224],
     [108.36341, 29.032578]
   ]
 ]
})
// 设置旋转中心点
const rotatePoint = new Point({
  coordinates: [108.36341, 29.032578]
})
// 执行旋转操作
const rotateGeometry = GeometryEngine.rotate(polygon, 10, rotatePoint)</code></pre>
    

        <p class="code-caption"><h5 id='rotate10'>绕点旋转 - 点</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Point, GeometryEngine } from "@mapgis/webclient-common"
// 构造点几何
const point = new Point({
  coordinates: [
    [108.36341, 29.032578]
  ]
})
// 设置旋转中心点
const rotatePoint = new Point({
  coordinates: [112.13094, 33.273224]
})
// 执行旋转操作
const rotateGeometry = GeometryEngine.rotate(point, 10, rotatePoint)</code></pre>
    


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


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

    
    <div class="description">
        <p>拓扑矫正
<a id='simplify'></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>geometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>
|

<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>


  
  </td>

  

  <td class="description last"><p>要进行矫正的几何</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line8331">line 8331</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="Geometry.html">Geometry</a></span>


    </div>
    
</div>

                
        </div>
    </div>






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


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

    
    <div class="description">
        <p><a id='touches'></a>
判断一个几何对象是否和另一个几何对象相邻
被测试相邻关系的几何类型为:线、多线、矩形、圆、区以及多区,忽略三维高度;<br/>
用来测试相邻关系的几何类型为:点、多点、线、多线、矩形、圆、区以及多区,忽略三维高度,穿线和被穿过几何的坐标系必须相同;<br/>
线和点相邻的标准为:点在线的两端,且线不是头尾闭合的;<br/>
对于multi类型的几何(如多点、多线、多区),无论其和任何其他支持的几何类型判断touch,只要multi中的一个与另一个geometry有包含关系、相交关系,touch即为false;<br/>
对于区、线、圆、矩形和多点判断相邻关系时,只有有一个点在区内、线上、矩形内、圆内,touch即为false;<br/>
示例如下:<br/>
<a href='#touch1'>[1、线和点相邻]</a><br/>
<a href='#touch2'>[2、多线和多点相邻]</a><br/>
<a href='#touch3'>[3、区和线相邻]</a><br/>
<a href='#touch4'>[4、多区和区相邻]</a><br/>
<a href='#touch5'>[5、圆和圆相邻]</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>geometry1</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>
|

<span class="param-type"><a href="Circle.html">Circle</a></span>
|

<span class="param-type"><a href="Extent.html">Extent</a></span>


  
  </td>

  

  <td class="description last"><p>用来测试相邻关系的几何,支持线、多线、区、多区、圆、矩形</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Point.html">Point</a></span>
|

<span class="param-type"><a href="LineString.html">LineString</a></span>
|

<span class="param-type"><a href="Polygon.html">Polygon</a></span>
|

<span class="param-type"><a href="MultiPoint.html">MultiPoint</a></span>
|

<span class="param-type"><a href="MultiLineString.html">MultiLineString</a></span>
|

<span class="param-type"><a href="MultiPolygon.html">MultiPolygon</a></span>
|

<span class="param-type"><a href="Circle.html">Circle</a></span>
|

<span class="param-type"><a href="Extent.html">Extent</a></span>


  
  </td>

  

  <td class="description last"><p>被测试相邻关系的几何,支持点、多点、线、多线、区、多区、圆、矩形</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line5786">line 5786</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">Boolean</span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5 id='touch1'>线和点相邻</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, LineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Point, LineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造线对象
const line1 = new LineString({
  coordinates: [
    [107.36341, 31.032578],
    [110, 31.032578],
    [117.13094, 31.032578],
    [107.36341, 31.032578],
  ]
})
// 构造点对象
const point = new Point({
  coordinates: [107.36341, 31.032578],
});
// 开始判断相邻
const isTouch = GeometryEngine.touches(line1, point)
console.log("线和点是否相邻:", isTouch)</code></pre>
    

        <p class="code-caption"><h5 id='touch2'>多线和多点相邻</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiPoint, MultiLineString, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiPoint, MultiLineString, GeometryEngine } from "@mapgis/webclient-common"
// 构造多线对象
 const multiLineString = new MultiLineString({
  coordinates: [
    [
      [112, 31],
      [112, 33],
    ],
    [
      [113, 31],
      [113, 33],
    ],
  ]
})
// 构造多点对象
   const multiPoint = new MultiPoint({
     coordinates: [
       [113, 32],
       [113, 31],
     ],
   });
// 开始判断相邻
const isTouch = GeometryEngine.touches(multiLineString,multiPoint)
console.log("多线和多点是否相邻:", isTouch)</code></pre>
    

        <p class="code-caption"><h5 id='touch3'>区和线相邻</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { LineString, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { LineString, Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造区对象
const polygon = new Polygon({
  coordinates: [
    [
      [108, 30],
      [115, 30],
      [115, 33],
      [108, 33],
      [108, 30],
    ],
    [
      [110, 31],
      [113, 31],
      [113, 32],
      [110, 32],
      [110, 31],
    ],
  ]
})
// 构造线对象
const line = new LineString({
  coordinates: [
    [105, 30],
    [108, 32],
  ]
})
// 开始判断相邻
const isTouch = GeometryEngine.touches(polygon, line)
console.log("区和线是否相邻:", isTouch)</code></pre>
    

        <p class="code-caption"><h5 id='touch4'>多区和区相邻</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { MultiPolygon, Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { MultiPolygon, Polygon, GeometryEngine } from "@mapgis/webclient-common"
// 构造多区对象
 const multiPolygon = new MultiPolygon({
     coordinates: [
       [
         [
           [105.0, 35.0],
           [110.0, 35.0],
           [110.0, 36.0],
           [105.0, 36.0],
           [105.0, 35.0],
         ],
       ],
       [
         [
           [108, 30],
           [115, 30],
           [115, 33],
           [108, 33],
           [108, 30],
         ],
         [
           [110, 31],
           [113, 31],
           [113, 32],
           [110, 32],
           [110, 31],
         ],
       ],
     ],
   });
// 构造区对象
const polygon = new Polygon({
  coordinates: [
    [
      [110, 33],
      [113, 33],
      [113, 37],
      [110, 37],
      [110, 33],
    ],
  ]
})
// 开始判断相邻
const isTouch = GeometryEngine.touches( multiPolygon, polygon)
console.log("多区是否和区相邻:", isTouch)</code></pre>
    

        <p class="code-caption"><h5 id='touch5'>圆和圆相邻</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Circle, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { Circle, GeometryEngine } from "@mapgis/webclient-common"
// 构造圆对象
 const circle1 = new Circle({
     // 中心点
     center: [113, 34],
     // 半径
     radius: 1,
   });
// 构造圆对象
 const circle2 = new Circle({
   // 中心点
   center: [115, 34],
   // 半径
   radius: 2,
 });
// 开始判断相邻
const isTouch = GeometryEngine.touches(circle1, circle2)
console.log("圆和圆是否相邻:", isTouch)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='union'></a>
多个几何对象求并,并返回求并后的新几何对象;<br/>
输入的几何类型必须一致,点和多点、区和多区视为同一个类型,且几何对象的坐标系要一致;<br/>
忽略三维高度;<br>
支持的几何有:点(多点)几何对象、区(多区)几何对象、范围几何对象、圆几何对象<br/>
点和点、点和多点、多点和多点合并为一个多点几何对象,如果有多个点坐标(XYZ)相同,则会去重;<br/>
线和线、线和多线、多线和多线合并为一个线几何对象或多线几何对象;<br/>
区和区、区和多区、多区和多区合并为一个区级和对象或多区几何对象;<br/>
矩形和矩形合并为一个多边形几何对象或一个更大的矩形几何对象;<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>geometries</code></td>
  

  <td class="type">
  
      
<span class="param-type">Array.&lt;<a href="Geometry.html">Geometry</a>></span>


  
  </td>

  

  <td class="description last"><p>求并几何或几何数组</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line1115">line 1115</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="Geometry.html">Geometry</a></span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5>点和点求并</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Point } from "@mapgis/webclient-common"
// 点和点求并
const point1 = new Point({
  coordinates: [1, 1]
})
const point2 = new Point({
  coordinates: [2, 1]
})
const point3 = new Point({
  coordinates: [3, 1, 100]
})
const union = GeometryEngine.union([point1, point2, point3])
console.log("点和点求并:", union)</code></pre>
    

        <p class="code-caption"><h5>点和多点求并</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, MultiPoint, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Point, MultiPoint } from "@mapgis/webclient-common"
// 点和多点求并
const point1 = new Point({
  coordinates: [1, 1]
})
const point2 = new MultiPoint({
  coordinates: [
    [2, 1],
    [3, 1]
  ]
})
const union = GeometryEngine.union([point1, point2])
console.log("点和多点求并:", union)</code></pre>
    

        <p class="code-caption"><h5>多点和多点求并</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Point, MultiPoint, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Point, MultiPoint } from "@mapgis/webclient-common"
// 多点和多点求并
const point1 = new MultiPoint({
  coordinates: [
    [2, 1],
    [3, 1],
    [3, 3, 4]
  ]
})
const point2 = new MultiPoint({
  coordinates: [
    [2, 1],
    [3, 1]
  ]
})
const union = GeometryEngine.union([point1, point2])
console.log("多点和多点求并:", union)</code></pre>
    

        <p class="code-caption"><h5>区和区求并</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Polygon } from "@mapgis/webclient-common"
// 区和区求并
const polygon1 = new Polygon({
  coordinates: [
    [
      [-82.574787, 35.594087],
      [-82.574787, 35.615581],
      [-82.545261, 35.615581],
      [-82.545261, 35.594087],
      [-82.574787, 35.594087]
    ]
  ]
})
const polygon2 = new Polygon({
  coordinates: [
    [
      [-82.560024, 35.585153],
      [-82.560024, 35.602602],
      [-82.52964, 35.602602],
      [-82.52964, 35.585153],
      [-82.560024, 35.585153]
    ]
  ]
})
const union = GeometryEngine.union([polygon1, polygon2])
console.log("区和区求并:", union)</code></pre>
    

        <p class="code-caption"><h5>区和带洞区求并</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Polygon } from "@mapgis/webclient-common"
// 区和带洞区求并
const polygon1 = new Polygon({
  coordinates: [
    [
      [100, 30],
      [110, 30],
      [110, 40],
      [100, 40],
      [100, 30]
    ]
  ]
})
const polygon2 = new Polygon({
  coordinates: [
    [
      [105, 30],
      [120, 30],
      [120, 40],
      [105, 40],
      [105, 30]
    ],
    [
      [108, 35],
      [116, 35],
      [116, 36],
      [108, 36],
      [108, 35]
    ]
  ]
})
const union = GeometryEngine.union([polygon1, polygon2])
console.log("区和带洞区求并:", union)</code></pre>
    

        <p class="code-caption"><h5>带洞区和带洞区的求并</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Polygon } from "@mapgis/webclient-common"
// 带洞区和带洞区的求并
const polygon1 = new Polygon({
   coordinates: [
     [
       [100, 30],
       [110, 30],
       [110, 40],
       [100, 40],
       [100, 30]
     ],
     [
       [103, 35],
       [106, 35],
       [106, 36],
       [103, 36],
       [103, 35]
     ]
   ]
 })
 const polygon2 = new Polygon({
   coordinates: [
     [
       [105, 30],
       [120, 30],
       [120, 40],
       [105, 40],
       [105, 30]
     ],
     [
       [108, 35],
       [116, 35],
       [116, 36],
       [108, 36],
       [108, 35]
     ]
   ]
 })
 const union = GeometryEngine.union([polygon1, polygon2])
 console.log("带洞区和带洞区的求并:", union)</code></pre>
    


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


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

    
    <div class="description">
        <p><a id='within'></a>
判断innerGeometry几何对象是否完全在outerGeometry中</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>innerGeometry</code></td>
  

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

  

  <td class="description last"><p>内部几何对象</p></td>
</tr>



        

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

  <td class="type">
  
      
<span class="param-type"><a href="Geometry.html">Geometry</a></span>


  
  </td>

  

  <td class="description last"><p>外部几何对象</p></td>
</tr>



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






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    

    

    

    
        <p class="tag-source">
            <a href="common_base_geometry_GeometryEngine.js.html" class="button">查看源代码</a>
            <span>
                <a href="common_base_geometry_GeometryEngine.js.html">common/base/geometry/GeometryEngine.js</a>, <a href="common_base_geometry_GeometryEngine.js.html#line5149">line 5149</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">Boolean</span>


    </div>
    
</div>

                
        </div>
    </div>






    <h5>示例</h5>
    
        <p class="code-caption"><h5>判断是否包含</h5></p>
    
    
        <pre class="prettyprint"><code>// ES5引入方式
const { Polygon, Point, GeometryEngine } = Zondy.Geometry
// ES6引入方式
import { GeometryEngine, Polygon, Point } from "@mapgis/webclient-common"
// 初始点几何,可以是任意几何
const point = new Point({
  coordinates: [1, 1]
})
// 初始化区几何,可以是任意几何
const polygon = new Polygon({
  coordinates: [
    [
      [1, 0],
      [10, 0],
      [10, 20],
      [1, 20],
      [1, 0]
    ]
  ]
})
// 判断点几何是否被区几何对象包含
const isContains = GeometryEngine.within(polygon, point)
console.log("点几何是否被区几何对象包含:", isContains)</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>