UNPKG

@mapgis/webclient-common

Version:

mapgis ES6 format for igserver

874 lines (291 loc) 11.7 kB
<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="#getProj">getProj</a></code></td> <td class="name"> <code> <span class="param-type"> * </span> </code> </td> <td class="name"><code></code></td> </tr> <tr class="deep-level-0"> <td class="name"><code><a href="#isCustomWKID">isCustomWKID</a></code></td> <td class="name"> <code> <span class="param-type"> Boolean </span> </code> </td> <td class="name"><code><p>是否为自定义wkid</p></code></td> </tr> <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)" href="Geometry.html">Geometry</a> </span> | <span class="param-type"> Array.&lt;<a onclick="getTypeHTML(event)" link="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=".getProj"> <a class="href-link" href="#.getProj">#</a> <span class='tag'>static</span> <span class="code-name" id="getProj" style="font-size:30px"> getProj<span class="signature">(crsDefinition, def)</span> </span> </h4> <h4>参数</h4> <div class="table-container"> <table class="params table"> <thead> <tr> <th>名称</th> <th>类型</th> <th class="last">描述</th> </tr> </thead> <tbody> <tr class="deep-level-0"> <td class="name"><code>crsDefinition</code></td> <td class="type"> <span class="param-type"> * </span> </td> <td class="description last"></td> </tr> <tr class="deep-level-0"> <td class="name"><code>def</code></td> <td class="type"> <span class="param-type"> * </span> </td> <td class="description last"></td> </tr> </tbody> </table> </div> <dl class="details"> </dl> <div class='columns method-parameter'> <div class="column is-2"><label>返回值</label></div> <div class="column is-10"> <div class="columns"> <div class='column is-5 has-text-left'> <label>类型: </label> <span class="param-type"> * </span> </div> </div> </div> </div> </div> <div class="member"> <h4 class="name" id=".isCustomWKID"> <a class="href-link" href="#.isCustomWKID">#</a> <span class='tag'>static</span> <span class="code-name" id="isCustomWKID" style="font-size:30px"> isCustomWKID<span class="signature">(wkid)</span> </span> </h4> <div class="description"> <p>是否为自定义wkid</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>wkid</code></td> <td class="type"> <span class="param-type"> Number </span> </td> <td class="description last"><p>自定义wkid</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>是否为自定义wkid</p></div> <div class='column is-5 has-text-left'> <label>类型: </label> <span class="param-type"> Boolean </span> </div> </div> </div> </div> </div> <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"><code>geometry</code></td> <td class="type"> <span class="param-type"> <a link="Geometry.html" onclick="getTypeHTML(event)" href="Geometry.html">Geometry</a> </span> | <span class="param-type"> Array.&lt;geometry> </span> </td> <td class="description last"><p>要投影的几何或几何数组</p></td> </tr> <tr class="deep-level-0"> <td class="name"><code>outSpatialReference</code></td> <td class="type"> <span class="param-type"> <a link="SpatialReference.html" onclick="getTypeHTML(event)" href="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)" href="Geometry.html">Geometry</a> </span> | <span class="param-type"> Array.&lt;<a onclick="getTypeHTML(event)" link="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>