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

Method addMap

src/common/iPortal/iPortalUser.js:51–64  ·  view source on GitHub ↗

* @function IPortalUser.prototype.addMap * @description 添加地图。 * @version 10.1.0 * @param {IPortalAddResourceParam} addMapParams - 添加地图的参数。 * @returns {Promise} 返回包含添加地图结果的 Promise 对象。

(addMapParams)

Source from the content-addressed store, hash-verified

49 * @returns {Promise} 返回包含添加地图结果的 Promise 对象。
50 */
51 addMap(addMapParams) {
52 if (!(addMapParams instanceof IPortalAddResourceParam)) {
53 return this.getErrMsgPromise("addMapParams is not instanceof IPortalAddResourceParam !");
54 }
55 let cloneAddMapParams = {
56 rootUrl: addMapParams.rootUrl,
57 tags: addMapParams.tags,
58 authorizeSetting: addMapParams.entities
59 }
60 let addMapUrl = this.iportalUrl + "/web/maps/batchaddmaps.json";
61 return this.request("POST", addMapUrl, JSON.stringify(cloneAddMapParams)).then(function(result) {
62 return result;
63 });
64 }
65
66 /**
67 * @function IPortalUser.prototype.addScene

Callers 1

iPortalUserSpec.jsFile · 0.80

Calls 2

getErrMsgPromiseMethod · 0.95
requestMethod · 0.45

Tested by

no test coverage detected