UNPKG

rn_supermap

Version:

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

2,483 lines (665 loc) 31.6 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: DataUploadService</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: DataUploadService</h1> <section> <header> <h2>DataUploadService</h2> </header> <article> <div class="container-overview"> <h4 class="name" id="DataUploadService"><span class="type-signature"></span>new DataUploadService<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> 数据上传类,用于将本地数据上传到iServer服务器。 </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line11">line 11</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".addDataset"><span class="type-signature">(static) </span>addDataset<span class="signature">(fullUrl, datasetName, datasetType)</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>fullUrl</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">服务名称。</td> </tr> <tr> <td class="name"><code>datasetName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">数据集名。</td> </tr> <tr> <td class="name"><code>datasetType</code></td> <td class="type"> <span class="param-type">Dataset.Type</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="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line54">line 54</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=".addFeature"><span class="type-signature">(static) </span>addFeature<span class="signature">(fullUrl, feature)</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>fullUrl</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">指定的数据服务地址,如:http://192.168.120.1:8090/iserver/services/data-world/rest/data/datasources/World/datasets/Lakes。</td> </tr> <tr> <td class="name"><code>feature</code></td> <td class="type"> <span class="param-type">object</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="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line88">line 88</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=".addFeatureByName"><span class="type-signature">(static) </span>addFeatureByName<span class="signature">(serviceName, datasourceName, datasetName, feature)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4> <div class="description"> 向iServer服务器中添加对象。 </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>serviceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">服务名称。</td> </tr> <tr> <td class="name"><code>datasourceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">数据源名。</td> </tr> <tr> <td class="name"><code>datasetName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">数据集名。</td> </tr> <tr> <td class="name"><code>feature</code></td> <td class="type"> <span class="param-type">object</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="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line105">line 105</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=".cloneDataset"><span class="type-signature">(static) </span>cloneDataset<span class="signature">(serviceName, datasourceName, destDatasetName, srcDatasourceName, srcDatasetName)</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>serviceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">服务名称。</td> </tr> <tr> <td class="name"><code>datasourceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">数据源名。</td> </tr> <tr> <td class="name"><code>destDatasetName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">目标数据集名。</td> </tr> <tr> <td class="name"><code>srcDatasourceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">源数据源名。</td> </tr> <tr> <td class="name"><code>srcDatasetName</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="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line72">line 72</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=".commitDataset"><span class="type-signature">(static) </span>commitDataset<span class="signature">(urlDataset, dataset)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4> <div class="description"> 将本地数据集中修改、删除、新增的数据提交到服务器上对应的数据集中。提交时要求本地和服务器上都存在该数据集及其对应的属性数据集(属性数据集用于记录被修改和被删除的记录)。 同时本地数据集的版本不得高于服务器上的版本(即本地的Max[SmUserID]不大于服务器上的Max[SMID]),否则不能提交,需要先进行更新。目前数据集的类型支持点、线、面数据集。 如果提交失败,将调用ResponseCallback中的requestFaild()方法;如果成功,将调用requestSuccess()方法。 </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>urlDataset</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">dataset在服务器上的地址。</td> </tr> <tr> <td class="name"><code>dataset</code></td> <td class="type"> <span class="param-type">objecg</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="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line190">line 190</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=".createObj"><span class="type-signature">(static) </span>createObj<span class="signature">(url)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="DataUploadService.html">DataUploadService</a>>}</span></h4> <div class="description"> 指定url地址创建一个DataUploadService实例 </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>url</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="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line35">line 35</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;<a href="DataUploadService.html">DataUploadService</a>></span> </dd> </dl> <h4 class="name" id=".deleteDataset"><span class="type-signature">(static) </span>deleteDataset<span class="signature">(fullUrl)</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>fullUrl</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">要删除的数据集地址,如:http://192.168.120.1:8090/iserver/services/data-world/rest/data/datasources/World/datasets/Lakes。</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line204">line 204</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=".deleteDatasetByName"><span class="type-signature">(static) </span>deleteDatasetByName<span class="signature">(serviceName, datasourceName, datasetName)</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>serviceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">服务名称。</td> </tr> <tr> <td class="name"><code>datasourceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">数据源名。</td> </tr> <tr> <td class="name"><code>datasetName</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="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line220">line 220</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=".deleteFeature"><span class="type-signature">(static) </span>deleteFeature<span class="signature">(fullUrl, featureIDs)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4> <div class="description"> 根据指定的对象ID数组删除iServer服务器中的对象。 </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>fullUrl</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">指定数据服务地址,如:http://192.168.120.1:8090/iserver/services/data-world/rest/data/datasources/World/datasets/Lakes。</td> </tr> <tr> <td class="name"><code>featureIDs</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">对象ID数组。</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line121">line 121</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=".deleteFeatureByName"><span class="type-signature">(static) </span>deleteFeatureByName<span class="signature">(serviceName, datasourceName, datasetName, featureIDs)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4> <div class="description"> 根据指定的对象ID数组删除iServer服务器中的对象。 </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>serviceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">服务名称。</td> </tr> <tr> <td class="name"><code>datasourceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">数据源名。</td> </tr> <tr> <td class="name"><code>datasetName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">数据集名。</td> </tr> <tr> <td class="name"><code>featureIDs</code></td> <td class="type"> <span class="param-type">array</span> </td> <td class="description last">对象ID数组。</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line138">line 138</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=".modifyFeature"><span class="type-signature">(static) </span>modifyFeature<span class="signature">(fullUrl, featureID, feature)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4> <div class="description"> 根据指定的ID修改对象。 </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>fullUrl</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">要修改的对象地址,如:http://192.168.120.1:8090/iserver/services/data-world/rest/data/datasources/World/datasets/Lakes。</td> </tr> <tr> <td class="name"><code>featureID</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">要修改的对象ID。</td> </tr> <tr> <td class="name"><code>feature</code></td> <td class="type"> <span class="param-type">object</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="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line155">line 155</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=".modifyFeatureByName"><span class="type-signature">(static) </span>modifyFeatureByName<span class="signature">(serviceName, datasourceName, datasetName, featureID, feature)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4> <div class="description"> 根据指定的ID和数据名称修改对象。 </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>serviceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">服务名称。</td> </tr> <tr> <td class="name"><code>datasourceName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">数据源名。</td> </tr> <tr> <td class="name"><code>datasetName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">数据集名。</td> </tr> <tr> <td class="name"><code>featureID</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">要修改的对象ID。</td> </tr> <tr> <td class="name"><code>feature</code></td> <td class="type"> <span class="param-type">object</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="DataUploadService.js.html">DataUploadService.js</a>, <a href="DataUploadService.js.html#line173">line 173</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;void></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>