@mapgis/webclient-common
Version:
mapgis ES6 format for igserver
425 lines (148 loc) • 6.7 kB
HTML
<header id="page-title" class="page-title">
<span class="page-title-main">类名</span>
<span class="page-title-sub">Projection</span>
</header>
<section>
<article>
<div class="container-overview">
<div class='vertical-section'>
<div class="members">
<div class="member">
<h4 class="name" id="Projection">
<a class="href-link" href="#Projection">#</a>
<span class="code-name" id="Projection" style="font-size:30px">
new Projection<span class="signature">()</span>
</span>
</h4>
<div class="description">
<p>投影转换工具</p>
</div>
<dl class="details">
</dl>
</div>
</div>
</div>
</div>
<div class='vertical-section'>
<h3 id='function'>方法</h3>
<h4 style="margin-top: 20px;margin-bottom: 20px;">方法概述</h4>
<div class="members">
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>返回值类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code><a href="#project">project</a></code></td>
<td class="name">
<code>
<span class="param-type"><a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a></span>
|
<span class="param-type">Array.<<a link="Array.<Geometry>.html" onclick="getTypeHTML(event)" href="Geometry.html">Geometry</a>></span>
</code>
</td>
<td class="name"><code><p>将几何对象投影到指定坐标系中</p></code></td>
</tr>
</tbody>
</table>
</div>
<h4 style="margin-top: 20px;margin-bottom: 20px;">方法详情</h4>
<div class="member">
<h4 class="name" id=".project">
<a class="href-link" href="#.project">#</a>
<span class='tag'>static</span>
<span class="code-name" id="project" style="font-size:30px">
project<span class="signature">(geometry, outSpatialReference)</span>
</span>
</h4>
<div class="description">
<p>将几何对象投影到指定坐标系中</p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name" id="geometry"><code>geometry</code></td>
<td class="type">
<span class="param-type"><a link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a></span>
|
<span class="param-type">Array.<geometry></span>
</td>
<td class="description last"><p>要投影的几何或几何数组</p></td>
</tr>
<tr class="deep-level-0">
<td class="name" id="outSpatialReference"><code>outSpatialReference</code></td>
<td class="type">
<span class="param-type"><a link="SpatialReference.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="SpatialReference" SpatialReference.html>SpatialReference</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 link="Geometry.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="Geometry" Geometry.html>Geometry</a></span>
|
<span class="param-type">Array.<<a link="Array.<Geometry>.html" onclick="getTypeHTML(event)" href="Geometry.html">Geometry</a>></span>
</div>
</div>
</div>
</div>
<h5>示例</h5>
<p class="code-caption"><h7>将3857坐标系的点转为4326坐标系的点</h7></p>
<pre class="prettyprint"><code>const projectedGeometry = Zondy.Geometry.Projection.project(
new Zondy.Geometry.Extent({
xmin: 12062959.621822732,
ymin: 3379793.138124517,
xmax: 12927637.10614421,
ymax: 3931626.287996913,
spatialReference: new Zondy.SpatialReference({
wkid: 3857
})
}),
new Zondy.SpatialReference({
wkid: 4326
})
)</code></pre>
<p class="code-caption"><h7>将未收录的坐标系的点转为4326坐标系的点</h7></p>
<pre class="prettyprint"><code>const projectedGeometry = Zondy.Geometry.Projection.project(
new Zondy.Geometry.Extent({
xmin: -45257.10778559791,
ymin: 3212885.1836444484,
xmax: 705989.8953363781,
ymax: 3691623.86404564,
spatialReference: new Zondy.SpatialReference({
wkid: 4547,
wkt: '+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs'
})
}),
new Zondy.SpatialReference({
wkid: 4326
})
)</code></pre>
</div>
</div>
</div>
</article>
</section>