@mapgis/webclient-common
Version:
An important part of the MapGIS Client for JavaScript product, which provides interfaces and functions unrelated to the map engine.
9,777 lines • 268 kB
HTML
<!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="/static/modules/common/api/common-mapgis/index.html"
>
Common
</a>
<a
class="link user-link "
href="/static/modules/cesium/api/cesium-mapgis/index.html"
>
Cesium-Plugin
</a>
<a
class="link user-link "
href="/static/modules/mapboxgl/api/mapboxgl-mapgis/index.html"
>
MapboxGL-Plugin
</a>
<a
class="link user-link "
href="/static/modules/leaflet/api/leaflet-mapgis/index.html"
>
Leaflet-Plugin
</a>
<a
class="link user-link "
href="/static/modules/openlayers/api/openLayers-mapgis/index.html"
>
OpenLayers-Plugin
</a>
<a
class="link user-link "
href="/static/modules/video/api/video-mapgis/index.html"
>
Video-Plugin
</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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="AddressServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ArcGISFeatureServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ArcGISGeometryServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ArcGISMapServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ArcGISVectorTileServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="BaseRegExp"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="BaseRegExp.html">BaseRegExp</a><span style="display: none;"><p>正则表达式基类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="BaseServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Cesium3DTilesServer"><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服务</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Config"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="FeatureServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="GeometryServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ImageServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Interceptor"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ISSceneServer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ISSceneServer.html">ISSceneServer</a><span style="display: none;"><p>IS场景服务</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LayerBaseUrlRegExp"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LayerBaseUrlRegExp.html">LayerBaseUrlRegExp</a><span style="display: none;"><p>图层基地址匹配正则表达式</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="M3DServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MapServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="PlotServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="PoiServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RequestConfig"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RequestInterceptor"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ResourceServer"><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>资源服</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ResponseInterceptor"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RootServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SceneServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SecurityServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ServerBaseUrlRegExp"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ServerBaseUrlRegExp.html">ServerBaseUrlRegExp</a><span style="display: none;"><p>服务基地址匹配正则表达式</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ServerUtil"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ServerUtil.html">ServerUtil</a><span style="display: none;"><p>根据输入的URL生成出图地址的工具类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TerrainServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ThemeServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TileServer"><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>瓦片服务</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="UrlUtil"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="UrlUtil.html">UrlUtil</a><span style="display: none;">undefined</span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="VectorTileServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WFSServer"><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>WFS服务</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WMSServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WMTSServer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WorkFlowServer"><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>工作流服务</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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="AnchorType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="AnchorType.html">AnchorType</a><span style="display: none;"><p>锚点位置类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="AngleUnit"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="AngleUnit.html">AngleUnit</a><span style="display: none;"><p>角度单位类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ArcType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ArcType.html">ArcType</a><span style="display: none;"><p>弧线类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="AreaUnits"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="AreaUnits.html">AreaUnits</a><span style="display: none;"><p>面积测量单位类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ColorNameToHexMap"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ColorNameToHexMap.html">ColorNameToHexMap</a><span style="display: none;"><p>css的字符串颜色对应的16进制颜色表类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Corporation"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Corporation.html">Corporation</a><span style="display: none;"><p>发布WMTS的厂商名称类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="CustomWKID"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="CustomWKID.html">CustomWKID</a><span style="display: none;"><p>自定义WKID类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ElevationMode"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ElevationMode.html">ElevationMode</a><span style="display: none;"><p>高度模式类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="EngineType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="EngineType.html">EngineType</a><span style="display: none;"><p>引擎类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="FetchMethod"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="FetchMethod.html">FetchMethod</a><span style="display: none;"><p>请求类型枚举类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="GeometryType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="GeometryType.html">GeometryType</a><span style="display: none;"><p>几何类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="HorizontalAlignment"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="HorizontalAlignment.html">HorizontalAlignment</a><span style="display: none;"><p>水平方向类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSGeometryType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSGeometryType.html">IGSGeometryType</a><span style="display: none;"><p>IGSGeometryType 枚举类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSSceneOriginLayerType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSSceneOriginLayerType.html">IGSSceneOriginLayerType</a><span style="display: none;"><p>场景图层子图层原始类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSSymbolType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSSymbolType.html">IGSSymbolType</a><span style="display: none;"><p>IGS后端符号类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LayerEventType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LayerEventType.html">LayerEventType</a><span style="display: none;"><p>图层事件类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LayerType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LayerType.html">LayerType</a><span style="display: none;"><p>图层模块型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LengthUnit"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LengthUnit.html">LengthUnit</a><span style="display: none;"><p>长度单位类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LinearUnits"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LinearUnits.html">LinearUnits</a><span style="display: none;"><p>线性测量长度单位类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineCapType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LineCapType.html">LineCapType</a><span style="display: none;"><p>线端点样式类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineJoinType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LineJoinType.html">LineJoinType</a><span style="display: none;"><p>线拐角样式类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineMarkerPlacement"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LineMarkerPlacement.html">LineMarkerPlacement</a><span style="display: none;"><p>线的Marker的摆放位置类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineMarkerStyle"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LineMarkerStyle.html">LineMarkerStyle</a><span style="display: none;"><p>线的Marker的样式类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LinePatternStyle"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LinePatternStyle.html">LinePatternStyle</a><span style="display: none;"><p>虚线样式类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LoadStatus"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LoadStatus.html">LoadStatus</a><span style="display: none;"><p>图层加载状态类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LogType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LogType.html">LogType</a><span style="display: none;"><p>日志输出类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MapEventType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MapEventType.html">MapEventType</a><span style="display: none;"><p>文档管理器事件类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MaterialType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MaterialType.html">MaterialType</a><span style="display: none;"><p>材质类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="NormalizationType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="NormalizationType.html">NormalizationType</a><span style="display: none;"><p>归一化类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="PatternStyle"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="PatternStyle.html">PatternStyle</a><span style="display: none;"><p>区间隔填充样式类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="PictureFormat"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="PictureFormat.html">PictureFormat</a><span style="display: none;"><p>图片格式枚举类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ProfileType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ProfileType.html">ProfileType</a><span style="display: none;"><p>管道横截面类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RadiusUnit"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="RadiusUnit.html">RadiusUnit</a><span style="display: none;"><p>圆的半径单位类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RasterInterpolationType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="RasterInterpolationType.html">RasterInterpolationType</a><span style="display: none;"><p>栅格重采样方法类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RendererType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="RendererType.html">RendererType</a><span style="display: none;"><p>渲染器类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ReturnFormat"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ReturnFormat.html">ReturnFormat</a><span style="display: none;"><p>返回格式枚举类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SceneMode"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SceneMode.html">SceneMode</a><span style="display: none;"><p>三维场景模式类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SeverVectorTileSubLayerType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SeverVectorTileSubLayerType.html">SeverVectorTileSubLayerType</a><span style="display: none;"><p>服务端矢量瓦片子图层类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ShadowMode"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ShadowMode.html">ShadowMode</a><span style="display: none;"><p>三维阴影模式类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchDataType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchDataType.html">SketchDataType</a><span style="display: none;"><p>草图数据类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchEditMode"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditMode.html">SketchEditMode</a><span style="display: none;"><p>草图数据类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchEditorEventType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditorEventType.html">SketchEditorEventType</a><span style="display: none;"><p>草图数据类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchEditorState"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditorState.html">SketchEditorState</a><span style="display: none;"><p>创建或编辑时,草图图形子状态类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchEditorToolEventType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditorToolEventType.html">SketchEditorToolEventType</a><span style="display: none;"><p>草图编辑工具事件类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SpatialRelation"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SpatialRelation.html">SpatialRelation</a><span style="display: none;"><p>空间判定规则枚举类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="StatisticType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="StatisticType.html">StatisticType</a><span style="display: none;"><p>统计方法类型枚举类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SubLayerType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SubLayerType.html">SubLayerType</a><span style="display: none;"><p>子图层枚举类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Symbol3DLayerType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Symbol3DLayerType.html">Symbol3DLayerType</a><span style="display: none;"><p>三维符号图层类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SymbolType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SymbolType.html">SymbolType</a><span style="display: none;"><p>符号类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TDTLayerType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="TDTLayerType.html">TDTLayerType</a><span style="display: none;"><p>天地图图层类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TemporalUnit"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="TemporalUnit.html">TemporalUnit</a><span style="display: none;"><p>时间单位类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TileSliceType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="TileSliceType.html">TileSliceType</a><span style="display: none;"><p>瓦片的切片方式类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TokenAttachType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="TokenAttachType.html">TokenAttachType</a><span style="display: none;"><p>token附加类型枚举类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="UrlServerType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="UrlServerType.html">UrlServerType</a><span style="display: none;"><p>url对应的服务类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="VectorTileGeometryType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="VectorTileGeometryType.html">VectorTileGeometryType</a><span style="display: none;"><p>矢量瓦片几何类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="VerticalAlignment"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="VerticalAlignment.html">VerticalAlignment</a><span style="display: none;"><p>垂直对齐类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="VideoSourceType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="VideoSourceType.html">VideoSourceType</a><span style="display: none;"><p>视频源格式类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ViewEventType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ViewEventType.html">ViewEventType</a><span style="display: none;"><p>地图视窗事件类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="VisualVariableType"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="VisualVariableType.html">VisualVariableType</a><span style="display: none;"><p>视觉变量类型类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WaterbodySize"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WaterbodySize.html">WaterbodySize</a><span style="display: none;"><p>水体大小类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WaveStrength"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WaveStrength.html">WaveStrength</a><span style="display: none;"><p>波浪强度类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WMTSCorporation"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WMTSCorporation.html">WMTSCorporation</a><span style="display: none;"><p>发布WMTS的厂商名称类,计划废弃,请使用Corporation代替</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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ArcGISMapImageLayer"><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 "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ArcGISMapImageSubLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ArcGISTileLayer"><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 "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ArcGISVectorTileLayer"><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/>
支持通过如下三种方式来初始化矢量瓦片图层对象:<br/>
1、通过服务基地址来初始化矢量瓦片图层对象;<br/>
2、通过加载矢量瓦片样式文件的方式来初始化矢量瓦片图层对象;<br/>
3、通过设置矢量瓦片样式的方式来初始化矢量瓦片图层对象;<br/>
<br><br>[ES5引入方式]:<br/>
zondy.layer.ArcGISVectorTileLayer() <br/>
[ES6引入方式]:<br/>
import { ArcGISVectorTileLayer } from "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源以加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}
<br/><br/>
同时也支持二次开发自定义业务逻辑,示例如下:<br/>
<a href='#custom-es5'>[自定义矢量瓦片业务逻辑-es5]</a>,<a href='#custom-es6'>[自定义矢量瓦片业务逻辑-es6]</a></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ArcGISVectorTileSubLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="BaseScene"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="BaseScene.html">BaseScene</a><span style="display: none;"><p>基础场景</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Cesium3DTilesCacheLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="EchartsLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="FeatureLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="GeoJSONLayer"><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 "@mapgis/webclient-common"</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="GraphicsLayer"><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 "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="GroupLayer"><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><br><br>[ES5引入方式]:<br/>
zondy.layer.GroupLayer() <br/>
[ES6引入方式]:<br/>
import { GroupLayer } from "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSFeatureLayer"><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 "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSImageryLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSImageryLayer.html">IGSImageryLayer</a><span style="display: none;"><p>IGS影像服务图层</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSImageryTileLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSImageryTileLayer.html">IGSImageryTileLayer</a><span style="display: none;"><p>IGS影像服务瓦片图层</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSMapImageLayer"><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 "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSMapImageSubLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSScene"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSScene.html">IGSScene</a><span style="display: none;"><p>场景对象</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSSceneLabelSubLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSSceneLabelSubLayer.html">IGSSceneLabelSubLayer</a><span style="display: none;"><p>IGS的SceneLayer子图层</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSSceneLayer"><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>场景图层,当使用的Cesium版本为10.7.2.x及以下时,场景图层的M3D缓存子图层仅支持设置token参数,不支持设置请求头参数</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSSceneMapRefSubLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSSceneMapRefSubLayer.html">IGSSceneMapRefSubLayer</a><span style="display: none;"><p>IGS的SceneLayer子图层</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSSceneModelCacheSubLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSSceneModelCacheSubLayer.html">IGSSceneModelCacheSubLayer</a><span style="display: none;"><p>IGS的SceneLayer子图层,当使用的Cesium版本为10.7.2.x及以下时,M3D缓存子图层仅支持设置token参数,不支持设置请求头参数</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSSceneSubLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSSceneTerrainSubLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="IGSSceneTerrainSubLayer.html">IGSSceneTerrainSubLayer</a><span style="display: none;"><p>IGS的SceneLayer子图层</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSTileLayer"><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两个服务版本,支持自定义坐标系
<br><br>[ES5引入方式]:<br/>
zondy.layer.IGSTileLayer() <br/>
[ES6引入方式]:<br/>
import { IGSTileLayer } from "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSVectorTileLayer"><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矢量瓦片图层<br/>
支持IGS1.0和2.0两个服务版本<br/>
<br/>
支持通过如下三种方式来初始化矢量瓦片图层对象:<br/>
1、通过服务基地址来初始化矢量瓦片图层对象;<br/>
2、通过加载矢量瓦片样式文件的方式来初始化矢量瓦片图层对象;<br/>
3、通过设置矢量瓦片样式的方式来初始化矢量瓦片图层对象;<br/>
当加载MapGIS制作并由IGS发布的矢量瓦片时,如果矢量瓦片样式中有mapinfo参数,则子图层ID对应的是MapX中的图层索引;
如果没有mapinfo参数,则子图层ID对应的是矢量瓦片样式图层ID;<br/>
当加载第三方发布的矢量瓦片时,子图层ID对应的是矢量瓦片样式图层ID;<br/>
<br><br>[ES5引入方式]:<br/>
zondy.layer.IGSVectorTileLayer() <br/>
[ES6引入方式]:<br/>
import { IGSVectorTileLayer } from "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源以加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}
<br/>
<br/>
同时也支持二次开发自定义业务逻辑,示例如下:<br/>
<a href='#custom-es5'>[自定义矢量瓦片业务逻辑-es5]</a>,<a href='#custom-es6'>[自定义矢量瓦片业务逻辑-es6]</a>
<br/>
<br/>
注意:三维上,不支持简单Marker样式设定;二维上,简单Marker的颜色,外边线样式,旋转角度无法在图层初始化和初始化后修改,须在制作数据时进行指定</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IGSVectorTileSubLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ImageryLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ImageryLayer.html">ImageryLayer</a><span style="display: none;"><p>影像服务图层</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ImageryTileLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ImageryTileLayer.html">ImageryTileLayer</a><span style="display: none;"><p>影像服务瓦片图层</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ISScene"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ISScene.html">ISScene</a><span style="display: none;"><p>iServer场景对象</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ISSceneLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ISSceneLayer.html">ISSceneLayer</a><span style="display: none;"><p>iServer场景图层,可以接入SuperMap iServer发布的三维服务</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ISSceneModelCacheSubLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ISSceneModelCacheSubLayer.html">ISSceneModelCacheSubLayer</a><span style="display: none;"><p>iServer场景图层的模型缓存子图层</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ISSceneSubLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ISSceneSubLayer.html">ISSceneSubLayer</a><span style="display: none;"><p>iServer场景图层的子图层</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Layer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LOD"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LOD.html">LOD</a><span style="display: none;"><p>瓦片切图信息</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="M3DModelCacheLayer"><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缓存图层,当使用的Cesium版本为10.7.2.x及以下时,M3D缓存图层仅支持设置token参数,不支持设置请求头参数</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MapImageLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MapVLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="OGCLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="OverlayLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RasterFunction"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="RasterFunction.html">RasterFunction</a><span style="display: none;"><p>栅格数据处理渲染规则,支持ndvi、hillshade,NDVI应用于多光谱影像数据,HILLSHADE应用于DEM高程数据。</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RasterInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="RasterInfo.html">RasterInfo</a><span style="display: none;"><p>栅格信息</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="S3MTilesCacheLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="S3MTilesCacheLayer.html">S3MTilesCacheLayer</a><span style="display: none;"><p>S3MTiles图层</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SceneLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SubLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TerrainCacheLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TileInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="TileInfo.html">TileInfo</a><span style="display: none;"><p>瓦片切图信息</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TileLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="UnknownLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="VectorTileLayer"><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>矢量瓦片图层基类
<br>
<br>
可通过重写VectorTileLayer的load方法,来自定义矢量瓦片业务逻辑,示例如下:<br>
<a href='#custom-es5'>[自定义矢量瓦片业务逻辑-es5]</a>,<a href='#custom-es6'>[自定义矢量瓦片业务逻辑-es6]</a>
<br>
<br></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="VectorTileSubLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="VectorTileSubLayer.html">VectorTileSubLayer</a><span style="display: none;"><p>矢量瓦片子图层基类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WebTileLayer"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="WebTileLayer.html">WebTileLayer</a><span style="display: none;"><p>网络瓦片图层,<br>
支持加载任意网络地图服务,<br/>
服务的格式必须为:<br/>
http://{任意字符串}{x}{任意字符串}{y}{任意字符串}{z}<br/>
以天地图的DataServer服务为例,其服务地址必须是如下形式:<br/>
http://t5.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}<br/>
会将基地址中的{x}替换为列号,{y}替换为行号,{z}替换为级数<br/>
需要注意:<br/>
1、默认是标准的经纬度裁图坐标系(4326),默认支持的坐标系有地理坐标系和Web墨卡托坐标系<br/>
2、如果是上述坐标系,但是坐标系的分辨率有所改变,因此不是标准的地理坐标系和Web墨卡托坐标系;或者不是上述坐标系,请自行构造TileInfo、Extent、SpatialReference等参数,来创建图层<br/>
<br><br>[ES5引入方式]:<br/>
zondy.layer.WebTileLayer() <br/>
[ES6引入方式]:<br/>
import { WebTileLayer } from "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WFSLayer"><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.WFSLayer() <br/>
[ES6引入方式]:<br/>
import { WFSLayer } from "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WMSLayer"><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 "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WMSSubLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WMTSLayer"><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官网(https://epsg.io/)上查询到的坐标系<br/>
会自动读取图层元信息,不需要用户手动设置<br/>
WMTS图层中存在多个子图层,每个子图层中又有多个TileMatrixSet,因此每个子图层以及其对应的每一个TileMatrixSet,都对应一套实际的瓦片数据,默认会使用第0个图层的第0个TileMatrixSet来构建图层,同时用户也可以自己指定要加载的子图层,可以参考示例:<a href='#activeLayer'>[指定要激活的子图层]</a>
<br><br>[ES5引入方式]:<br/>
zondy.layer.WMTSLayer() <br/>
[ES6引入方式]:<br/>
import { WMTSLayer } from "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WMTSSubLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Basemap"><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 "@mapgis/webclient-common" <br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Map"><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 "@mapgis/webclient-common" <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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="BaseRenderer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ClassBreakClusterInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ClassBreakClusterInfo.html">ClassBreakClusterInfo</a><span style="display: none;"><p>聚合点数量区间内的符号信息</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ClassBreakInfo"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ClassBreakRenderer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ClusterRenderer"><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>聚类渲染器,多个点聚集在一起,会形成一个点符号
使用须知:
1、推荐使用点要素图层作为聚类的数据,区和线会额外增加计算聚类点的工作量,影响加载的性能。
2、推荐使用空间参考系为地理系的数据,其他投影系会在前端内部处理反投逻辑,影响加载的性能。</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ColorStop"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ColorVariable"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="HeatmapColorStop"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="HeatmapRenderer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="OpacityStop"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="OpacityVariable"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RandomRenderer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RankRenderer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="RendererInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="RendererInfo.html">RendererInfo</a><span style="display: none;">undefined</span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SimpleRenderer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SizeStop"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SizeVariable"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="UniqueValueClusterInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="UniqueValueClusterInfo.html">UniqueValueClusterInfo</a><span style="display: none;"><p>聚合点数量区间内的符号信息</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="UniqueValueInfo"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="UniqueValueRenderer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="VisualVariable"><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></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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="BaseView"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MapView"><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>二维视图基类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SceneView"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SceneView.html">SceneView</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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Callout3D"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ColorMaterial"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Edges3D"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ExtrudeSymbol3DLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="FillSymbol"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="FillSymbol3DLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="FillSymbol3DOutline"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Font"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Font.html">Font</a><span style="display: none;"><p>字体样式,参考示例:<a href='#new-Font'>[字体样式]</a></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IconResource"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="IconSymbol3DLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LabelClass"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="LabelClass.html">LabelClass</a><span style="display: none;"><p>注记样式(目前仅支持三维SceneView上要素图层、GeoJSON、wfs等图层动态注记),参考示例:<a href='#new-LabelClass'>[创建注记样式对象]</a></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LabelSymbol3D"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineCallout3D"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineStyleMarker3D"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineStylePattern3D"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineSymbol"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineSymbol3D"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineSymbol3DLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineSymbolMarker"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MapGISTextSymbol"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MarkerSymbol"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ObjectSymbol3DLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="PathSymbol3DLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="PictureFillSymbol"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="PictureMarkerSymbol"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="PointSymbol3D"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="PointSymbol3DOutline"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="PolygonSymbol3D"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SimpleFillSymbol"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SimpleLineSymbol"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SimpleMarkerSymbol"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="StylePattern3D"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Symbol"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Symbol3DLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Symbol3DVerticalOffset"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TextHalo"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TextSymbol"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="TextSymbol3DLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="WaterSymbol3DLayer"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Circle"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Extent"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Geometry"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="GeometryEngine"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="LineString"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MultiLineString"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MultiPoint"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MultiPolygon"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Point"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Polygon"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Projection"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SpatialReference"><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 "@mapgis/webclient-common" <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="">基础对象模块</div><ul class="mapgis-sidebar-menus"><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Collection"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Collection.html">Collection</a><span style="display: none;"><p>集合类用来存储相同类型的项的数组,提供了大量的实用方法来处理集合中的元素,包括filter()、find()和reduce()等。<br>
集合中的元素可以是任何类型。例如,GraphicsLayer.graphics是存储在GraphicsLayer中的图形的集合。您可以使用Collection类中的方法来添加、删除、重新排序或操作GraphicsLayer中的图形。<br>
集合的另一个示例是Map.layers,它是所有地图的集合。</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="CollectionFlattener"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="CollectionFlattener.html">CollectionFlattener</a><span style="display: none;">undefined</span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Color"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Color.html">Color</a><span style="display: none;"><p>颜色类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ElevationInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ElevationInfo.html">ElevationInfo</a><span style="display: none;"><p>高程模式参数</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Evented"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="UpdateContent"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="CursorChangeEventInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="CursorChangeEventInfo.html">CursorChangeEventInfo</a><span style="display: none;">undefined</span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="MoveEventInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="MoveEventInfo.html">MoveEventInfo</a><span style="display: none;">undefined</span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="ScaleEventInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="ScaleEventInfo.html">ScaleEventInfo</a><span style="display: none;">undefined</span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchBaseDrawTool"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchCircleDrawTool"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchEditor"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchEditor3D"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditor3D.html">SketchEditor3D</a><span style="display: none;"><p>三维场景草图编辑类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchEditorToolEventInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditorToolEventInfo.html">SketchEditorToolEventInfo</a><span style="display: none;">undefined</span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchExtentDrawTool"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchFreehandPolygonDrawTool"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchFreehandPolygonDrawTool.html">SketchFreehandPolygonDrawTool</a><span style="display: none;"><p>手绘区绘图工具类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchFreehandPolylineDrawTool"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchFreehandPolylineDrawTool.html">SketchFreehandPolylineDrawTool</a><span style="display: none;"><p>手绘线绘图工具类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchPointDrawTool"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchPolygonDrawTool"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchPolylineDrawTool"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchStage"><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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchStyle"><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><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="SketchTopologyTool"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchTopologyTool.html">SketchTopologyTool</a><span style="display: none;"><p>草图拓扑分析类</p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="VertexChangeEventInfo"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="VertexChangeEventInfo.html">VertexChangeEventInfo</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 style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="Feature"><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 "@mapgis/webclient-common" <br/>
<br/></p></span></li><li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="FeatureSet"><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 "@mapgis/webclient-common" <br/>
<br/></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">
</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='#geodesicArea'>[12、计算实地面积]</a><br/>
<a href='#planarLength'>[13、计算图面长度]</a><br/>
<a href='#geodesicLength'>[14、计算实地长度]</a><br/>
<a href='#rotate'>[15、旋转]</a><br/>
<a href='#distance'>[16、计算距离]</a><br/>
<a href='#touches'>[17、是否相邻]</a><br/>
<a href='#union'>[18、求并]</a><br/>
<a href='#within'>[19、是否被包含(within)]</a><br/>
<a href='#buffer'>[20、缓冲区分析]</a><br/>
<a href='#isSimple'>[21、拓扑检查]</a><br/>
<a href='#getPositionsFromArc'>[22、通过三点弧段构造一组离散的点坐标]</a><br/>
<a href='#getArcFromGeometry'>[23、通过几何中的三点弧段数据,构造离散后的几何对象]</a><br/>
<a href='#getCenter'>[24、通过三个点求圆心]</a><br/>
<a href='#getAngleFromPoints'>[25、计算三点之间的夹角]</a><br/>
<a href='#simplify'>[26、拓扑矫正]</a><br/>
<a href='#getCentroid'>[27、获取几何中心点]</a><br/>
<a href='#getLabelPoint'>[27、获取几何label点]</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.<<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.<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="LengthUnit.html">LengthUnit</a></span>
</td>
<td class="default">
LengthUnit.meters
</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">
</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.<<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.meters, 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">
</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;<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">
</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">
</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.<<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">
</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">
</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>单位,默认为"kilometers"</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值:</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>距离</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">
</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=".geodesicArea">
<a class="href-link" href="#.geodesicArea">#</a>
<span class='tag'>static</span>
<span class="code-name" style="font-size:30px">
geodesicArea<span class="signature">(geometry, unit<span class="signature-attributes">opt</span>)</span>
</span>
</h4>
<div class="description">
<p><a id='geodesicArea'></a>
计算几何的实地面积;<br/>
支持自定义坐标系,忽略三维高度;<br/>
支持区、多区、矩形和圆形几何对象;<br/>
当为区或多区几何对象时,若该区带洞或多区的子区带洞,则会减去这些洞的面积;<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>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="default">
</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="AreaUnits.html">AreaUnits</a></span>
</td>
<td class="default">
AreaUnits.squareMeters
</td>
<td class="description last"><p>返回值的单位</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值:</label></div>
<div class="column is-10">
<div class="columns">
<div class='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 { 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.geodesicArea(polygon)</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>
|
<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>
<tr class="deep-level-0">
<td class="name"><code>unit</code></td>
<td class="type">
<span class="param-type"><a href="LengthUnit.html">LengthUnit</a></span>
</td>
<td class="default">
LengthUnit.meters
</td>
<td class="description last"><p>单位,默认米</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值:</label></div>
<div class="column is-10">
<div class="columns">
<div class='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.<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.<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.<Number></span>
</td>
<td class="description last"><p>第三个点</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值:</label></div>
<div class="column is-10">
<div class="columns">
<div class='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.<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">
</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.<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.<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.<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">
</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.<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=".getCenterPoint">
<a class="href-link" href="#.getCenterPoint">#</a>
<span class='tag'>static</span>
<span class="code-name" style="font-size:30px">
getCenterPoint<span class="signature">(geometry)</span>
</span>
</h4>
<div class="description">
<p>获取几何中心点
<a id='getCenterPoint'></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="Point.html">Point</a></span>
|
<span class="param-type"><a href="MultiPoint.html">MultiPoint</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="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">
</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="Point.html">Point</a></span>
|
<span class="param-type">null</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id=".getCentroid">
<a class="href-link" href="#.getCentroid">#</a>
<span class='tag'>static</span>
<span class="code-name" style="font-size:30px">
getCentroid<span class="signature">(geometry)</span>
</span>
</h4>
<div class="description">
<p>获取几何质心
<a id='getCentroid'></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="Point.html">Point</a></span>
|
<span class="param-type"><a href="MultiPoint.html">MultiPoint</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="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">
</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="Point.html">Point</a></span>
|
<span class="param-type">null</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id=".getEllipseCoordinates">
<a class="href-link" href="#.getEllipseCoordinates">#</a>
<span class='tag'>static</span>
<span class="code-name" style="font-size:30px">
getEllipseCoordinates<span class="signature">(center, semiMajorAxis, semiMinorAxis, number)</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>center</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>
<tr class="deep-level-0">
<td class="name"><code>semiMajorAxis</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>semiMinorAxis</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>number</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>离散点数量</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值:</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>离散点坐标数组</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">Array</span>
</div>
</div>
</div>
</div>
</div>
<div class="member">
<h4 class="name" id=".getLabelPoint">
<a class="href-link" href="#.getLabelPoint">#</a>
<span class='tag'>static</span>
<span class="code-name" style="font-size:30px">
getLabelPoint<span class="signature">(geometry)</span>
</span>
</h4>
<div class="description">
<p>获取几何label点
<a id='getLabelPoint'></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="Extent.html">Extent</a></span>
|
<span class="param-type"><a href="Circle.html">Circle</a></span>
</td>
<td class="description last"><p>要计算label点的几何对象</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值:</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>label点对象。如果未找到label点,则返回空</p></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type"><a href="Point.html">Point</a></span>
|
<span class="param-type">null</span>
</div>
</div>
</div>
</div>
</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.<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.<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.<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>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值:</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><p>一组离散的点坐标</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
})</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.<<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">
</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.<<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">
</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">
</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">
</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 "@mapgis/webclient-common"
// 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("多点到目标点最近点:", pointToMultiPoint);</li>
</ul></div>
<div class='column is-5 has-text-left'>
<label>类型: </label>
<span class="param-type">Project.<<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">
</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, unit<span class="signature-attributes">opt</span>)</span>
</span>
</h4>
<div class="description">
<p><a id='planarArea'></a>
计算几何对象的面积;<br/>
仅计算图面面积,忽略地球弧度,未设置单位或坐标系为地理坐标系时,仅返回计算结果<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 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="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">
</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="AreaUnits.html">AreaUnits</a></span>
</td>
<td class="default">
null
</td>
<td class="description last"><p>返回值的单位</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值:</label></div>
<div class="column is-10">
<div class="columns">
<div class='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>, unit<span class="signature-attributes">opt</span>)</span>
</span>
</h4>
<div class="description">
<p><a id='planarLength'></a>
计算几何长度或周长;<br/>
仅计算图面距离,忽略地球弧度,未设置单位或坐标系为地理坐标系时,仅返回计算结果<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>
<tr class="deep-level-0">
<td class="name"><code>unit</code></td>
<td class="type">
<span class="param-type"><a href="LinearUnits.html">LinearUnits</a></span>
</td>
<td class="default">
null
</td>
<td class="description last"><p>返回值的单位</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值:</label></div>
<div class="column is-10">
<div class="columns">
<div class='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">
</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><caption id='rotate2'><h5>旋转区</h5></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">
</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">
</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.<<a href="Geometry.html">Geometry</a>></span>
</td>
<td class="description last"><p>求并几何或几何数组</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>返回值:</label></div>
<div class="column is-10">
<div class="columns">
<div class='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">
</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://webclient.smaryun.com: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>