UNPKG

rn_supermap

Version:

rn_supermap 一款基于React-Native框架的移动应用开发工具。基于该开发工具,用户可以使用JavaScript开发语言,开发出在Android和IOS操作系统下运行的原生移动GIS应用,入门门槛低,一次开发,处处运行。

2,050 lines (490 loc) 23.2 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: Workspace</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: Workspace</h1> <section> <header> <h2>Workspace</h2> </header> <article> <div class="container-overview"> <h4 class="name" id="Workspace"><span class="type-signature"></span>new Workspace<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> 工作空间是用户的工作环境,主要完成数据的组织和管理,包括打开、关闭、创建、保存工作空间文件(SXW,SMW,SXWU,SMWU,DEFAULT)。工作空间 Workspace 是 SuperMap 中的一个重要的概念,工作空间存储了一个工程项目(同一个事务过程)中所有的数据源,地图的组织关系,工作空间通过其中的数据源集合对象 Datasources ,地图集合对象 Maps 来管理其下的数据源,地图。 </div> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>DEFAULT</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">默认SMWU类型。</td> </tr> <tr> <td class="name"><code>SMWU</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">SMWU工作空间,文件型工作空间。</td> </tr> <tr> <td class="name"><code>SXWU</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">SXWU工作空间。</td> </tr> <tr> <td class="name"><code>UDB</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">数据库类型。</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line16">line 16</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".clearMap"><span class="type-signature">(static) </span>clearMap<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> 清空所有地图 </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line311">line 311</a> </li></ul></dd> </dl> <h4 class="name" id=".closeAllDatasource"><span class="type-signature">(static) </span>closeAllDatasource<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> 关闭所有数据集 </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line284">line 284</a> </li></ul></dd> </dl> <h4 class="name" id=".closeDatasource"><span class="type-signature">(static) </span>closeDatasource<span class="signature">(datasourceName)</span><span class="type-signature"> &rarr; {Promise.&lt;boolean>}</span></h4> <div class="description"> 关闭指定名称的数据集 </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>datasourceName</code></td> <td class="type"> </td> <td class="description last">数据集名称</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line269">line 269</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;boolean></span> </dd> </dl> <h4 class="name" id=".closeWorkspace"><span class="type-signature">(static) </span>closeWorkspace<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> 关闭工作空间 </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line236">line 236</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id=".createDatasource"><span class="type-signature">(static) </span>createDatasource<span class="signature">(filePath, engineType)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="Datasource.html">Datasource</a>>}</span></h4> <div class="description"> 创建数据集 </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>filePath</code></td> <td class="type"> </td> <td class="description last">指定创建数据集路径</td> </tr> <tr> <td class="name"><code>engineType</code></td> <td class="type"> </td> <td class="description last">数据集引擎类型</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line252">line 252</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;<a href="Datasource.html">Datasource</a>></span> </dd> </dl> <h4 class="name" id=".createObj"><span class="type-signature">(static) </span>createObj<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="Workspace.html">Workspace</a>>}</span></h4> <div class="description"> 创建workspace实例 </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line30">line 30</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;<a href="Workspace.html">Workspace</a>></span> </dd> </dl> <h4 class="name" id=".getDatasources"><span class="type-signature">(static) </span>getDatasources<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Datasources>}</span></h4> <div class="description"> 获得数据源集合 </div> <dl class="details"> <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>Workspace.js:getDatasources() function has been deprecated. If you want to get datasource , please call the getDatasource() function</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line47">line 47</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;Datasources></span> </dd> </dl> <h4 class="name" id=".getMapName"><span class="type-signature">(static) </span>getMapName<span class="signature">(mapIndex)</span><span class="type-signature"> &rarr; {string}</span></h4> <div class="description"> 根据地图序号获得地图名称 </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>mapIndex</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line159">line 159</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> </dd> </dl> <h4 class="name" id=".getMaps"><span class="type-signature">(static) </span>getMaps<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Maps>}</span></h4> <div class="description"> 获取工作空间下的Maps对象 </div> <dl class="details"> <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>Maps类已不推荐使用</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line142">line 142</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;Maps></span> </dd> </dl> <h4 class="name" id=".getSceneName"><span class="type-signature">(static) </span>getSceneName<span class="signature">(index)</span><span class="type-signature"></span></h4> <div class="description"> 获取三维场景名称 </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>index</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line324">line 324</a> </li></ul></dd> </dl> <h4 class="name" id=".open"><span class="type-signature">(static) </span>open<span class="signature">(workspaceConnectionInfo, passWord)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4> <div class="description"> 根据定义好的工作空间连接信息对象,打开工作空间。 </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>workspaceConnectionInfo</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>passWord</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">数据源密码(可选参数)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line108">line 108</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;void></span> </dd> </dl> <h4 class="name" id=".openDatasource"><span class="type-signature">(static) </span>openDatasource<span class="signature">(jsonObject)</span><span class="type-signature"> &rarr; {Promise.&lt;datasource>}</span></h4> <div class="description"> 打开数据源 jsonObject 获取网络数据源 </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>jsonObject</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">{engineType:<int>引擎类型 ,server:<sring>文件/服务器路径 ,driver:<string>驱动名称(可选参数)}</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line175">line 175</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;datasource></span> </dd> </dl> <h4 class="name" id=".removeMap"><span class="type-signature">(static) </span>removeMap<span class="signature">(mapName)</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> 移除地图 </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>mapName</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line298">line 298</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id=".saveWorkspace"><span class="type-signature">(static) </span>saveWorkspace<span class="signature">(server)</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> 保存工作空间 </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>server</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">另存url(可选参数)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Workspace.js.html">Workspace.js</a>, <a href="Workspace.js.html#line218">line 218</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BufferAnalyst.html">BufferAnalyst</a></li><li><a href="BufferAnalystParameter.html">BufferAnalystParameter</a></li><li><a href="DataDownloadService.html">DataDownloadService</a></li><li><a href="Dataset.html">Dataset</a></li><li><a href="DatasetVector.html">DatasetVector</a></li><li><a href="DatasetVectorInfo.html">DatasetVectorInfo</a></li><li><a href="Datasource.html">Datasource</a></li><li><a href="DatasourceConnectionInfo.html">DatasourceConnectionInfo</a></li><li><a href="DataUploadService.html">DataUploadService</a></li><li><a href="Feature.html">Feature</a></li><li><a href="FeatureSet.html">FeatureSet</a></li><li><a href="GeoLine.html">GeoLine</a></li><li><a href="Geometry.html">Geometry</a></li><li><a href="GeoPoint.html">GeoPoint</a></li><li><a href="GeoRegion.html">GeoRegion</a></li><li><a href="GeoStyle.html">GeoStyle</a></li><li><a href="Layer.html">Layer</a></li><li><a href="LayerSetting.html">LayerSetting</a></li><li><a href="LayerSettingVector.html">LayerSettingVector</a></li><li><a href="LocationManager.html">LocationManager</a></li><li><a href="Map.html">Map</a></li><li><a href="MapControl.html">MapControl</a></li><li><a href="MapView.html">MapView</a></li><li><a href="Navigation2.html">Navigation2</a></li><li><a href="OverlayAnalyst.html">OverlayAnalyst</a></li><li><a href="OverlayAnalystParameter.html">OverlayAnalystParameter</a></li><li><a href="Point.html">Point</a></li><li><a href="Point2D.html">Point2D</a></li><li><a href="QueryParameter.html">QueryParameter</a></li><li><a href="QueryService.html">QueryService</a></li><li><a href="Rectangle2D.html">Rectangle2D</a></li><li><a href="Scene.html">Scene</a></li><li><a href="Selection.html">Selection</a></li><li><a href="ServiceBase.html">ServiceBase</a></li><li><a href="ServiceQueryParameter.html">ServiceQueryParameter</a></li><li><a href="Size2D.html">Size2D</a></li><li><a href="Theme.html">Theme</a></li><li><a href="Track.html">Track</a></li><li><a href="TrackingLayer.html">TrackingLayer</a></li><li><a href="TraditionalNavi.html">TraditionalNavi</a></li><li><a href="Workspace.html">Workspace</a></li><li><a href="WorkspaceConnectionInfo.html">WorkspaceConnectionInfo</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Aug 01 2017 16:16:50 GMT+0800 (CST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>