MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / addScene

Method addScene

src/common/iPortal/iPortalUser.js:73–86  ·  view source on GitHub ↗

* @function IPortalUser.prototype.addScene * @description 添加场景。 * @version 10.1.0 * @param {IPortalAddResourceParam} addSceneParams - 添加场景的参数。 * @returns {Promise} 返回包含添加场景结果的 Promise 对象。

(addSceneParams)

Source from the content-addressed store, hash-verified

71 * @returns {Promise} 返回包含添加场景结果的 Promise 对象。
72 */
73 addScene(addSceneParams) {
74 if (!(addSceneParams instanceof IPortalAddResourceParam)) {
75 return this.getErrMsgPromise("addSceneParams is not instanceof IPortalAddResourceParam !");
76 }
77 let cloneAddSceneParams = {
78 rootUrl: addSceneParams.rootUrl,
79 tags: addSceneParams.tags,
80 authorizeSetting: addSceneParams.entities
81 }
82 let addSceneUrl = this.iportalUrl + "/web/scenes/batchaddscenes.json";
83 return this.request("POST", addSceneUrl, JSON.stringify(cloneAddSceneParams)).then(function(result) {
84 return result;
85 });
86 }
87
88 /**
89 * @function IPortalUser.prototype.registerService

Callers 1

iPortalUserSpec.jsFile · 0.80

Calls 2

getErrMsgPromiseMethod · 0.95
requestMethod · 0.45

Tested by

no test coverage detected