@@ -16072,12 +16072,80 @@ class iPortalShareEntity_IPortalShareEntity {
16072
16072
SuperMap.iPortalShareEntity = iPortalShareEntity_IPortalShareEntity;
16073
16073
16074
16074
16075
+ // CONCATENATED MODULE: ./src/common/iPortal/iPortalAddResourceParam.js
16076
+ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
16077
+ * This program are made available under the terms of the Apache License, Version 2.0
16078
+ * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
16079
+
16080
+
16081
+
16082
+ /**
16083
+ * @class SuperMap.iPortalAddResourceParam
16084
+ * @classdesc iPortal 添加资源参数。
16085
+ * @version 10.0.1
16086
+ * @category iPortal/Online
16087
+ * @param {Object} params - iPortal 添加资源具体参数。
16088
+ * @param {String} [params.rootUrl] - 服务地址。
16089
+ * @param {Array} [params.tags] - 标签。
16090
+ * @param {SuperMap.iPortalShareEntity} [params.entities] - 资源的实体共享参数
16091
+ */
16092
+ class iPortalAddResourceParam_IPortalAddResourceParam {
16093
+
16094
+ constructor(params) {
16095
+ params = params || {};
16096
+ this.rootUrl = "";
16097
+ this.tags = [];
16098
+ this.entities = [];
16099
+ Util.extend(this, params);
16100
+ }
16101
+ }
16102
+ SuperMap.iPortalAddResourceParam = iPortalAddResourceParam_IPortalAddResourceParam;
16103
+
16104
+
16105
+ // CONCATENATED MODULE: ./src/common/iPortal/iPortalRegisterServiceParam.js
16106
+ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
16107
+ * This program are made available under the terms of the Apache License, Version 2.0
16108
+ * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
16109
+
16110
+
16111
+
16112
+ /**
16113
+ * @class SuperMap.iPortalRegisterServiceParam
16114
+ * @classdesc iPortal 注册服务参数。
16115
+ * @version 10.0.1
16116
+ * @category iPortal/Online
16117
+ * @param {Object} params - iPortal 注册服务具体参数。
16118
+ * @param {String} [params.type] - 服务类型。
16119
+ * @param {Array} [params.tags] - 服务标签。
16120
+ * @param {SuperMap.iPortalShareEntity} [params.entities] - 资源的实体共享参数
16121
+ * @param {Object} [params.metadata] - 服务元信息。
16122
+ * @param {Array} [params.addedMapNames] - 地图服务列表。
16123
+ * @param {Array} [params.addedSceneNames] - 场景服务列表。
16124
+ */
16125
+ class iPortalRegisterServiceParam_IPortalRegisterServiceParam {
16126
+
16127
+ constructor(params) {
16128
+ params = params || {};
16129
+ this.type = ""; // SUPERMAP_REST ARCGIS_REST WMS WFS WCS WPS WMTS OTHERS
16130
+ this.tags = [];
16131
+ this.entities = [];
16132
+ this.metadata = {};
16133
+ this.addedMapNames = [];
16134
+ this.addedSceneNames = [];
16135
+ Util.extend(this, params);
16136
+ }
16137
+ }
16138
+ SuperMap.iPortalRegisterServiceParam = iPortalRegisterServiceParam_IPortalRegisterServiceParam;
16139
+
16140
+
16075
16141
// CONCATENATED MODULE: ./src/common/iPortal/iPortalUser.js
16076
16142
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
16077
16143
* This program are made available under the terms of the Apache License, Version 2.0
16078
16144
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
16079
16145
16080
16146
16147
+
16148
+
16081
16149
/**
16082
16150
* @class SuperMap.iPortalUser
16083
16151
* @classdesc iPortal 门户中用户信息的封装类。用于管理用户资源,包括可删除,添加资源。
@@ -16108,6 +16176,88 @@ class iPortalUser_IPortalUser extends iPortalServiceBase_IPortalServiceBase {
16108
16176
}
16109
16177
return this.request("DELETE", deleteResourceUrl);
16110
16178
}
16179
+
16180
+ /**
16181
+ * @function SuperMap.iPortal.prototype.addMap
16182
+ * @description 添加地图。
16183
+ * @version 10.0.1
16184
+ * @param {SuperMap.iPortalAddResourceParam} addMapParams - 添加地图的参数。
16185
+ * @returns {Promise} 返回包含添加地图结果的 Promise 对象。
16186
+ */
16187
+ addMap(addMapParams) {
16188
+ if (!(addMapParams instanceof iPortalAddResourceParam_IPortalAddResourceParam)) {
16189
+ this.getErrMsgPromise("addMapParams is not instanceof IPortalAddResourceParam !");
16190
+ }
16191
+ let cloneAddMapParams = {
16192
+ rootUrl: addMapParams.rootUrl,
16193
+ tags: addMapParams.tags,
16194
+ authorizeSetting: addMapParams.entities
16195
+ }
16196
+ let addMapUrl = this.iportalUrl + "/web/maps/batchaddmaps.json";
16197
+ return this.request("POST", addMapUrl, JSON.stringify(cloneAddMapParams)).then(function(result) {
16198
+ return result;
16199
+ });
16200
+ }
16201
+
16202
+ /**
16203
+ * @function SuperMap.iPortal.prototype.addScene
16204
+ * @description 添加场景。
16205
+ * @version 10.0.1
16206
+ * @param {SuperMap.iPortalAddResourceParam} addSceneParams - 添加场景的参数。
16207
+ * @returns {Promise} 返回包含添加场景结果的 Promise 对象。
16208
+ */
16209
+ addScene(addSceneParams) {
16210
+ if (!(addSceneParams instanceof iPortalAddResourceParam_IPortalAddResourceParam)) {
16211
+ this.getErrMsgPromise("addSceneParams is not instanceof IPortalAddResourceParam !");
16212
+ }
16213
+ let cloneAddSceneParams = {
16214
+ rootUrl: addSceneParams.rootUrl,
16215
+ tags: addSceneParams.tags,
16216
+ authorizeSetting: addSceneParams.entities
16217
+ }
16218
+ let addSceneUrl = this.iportalUrl + "/web/scenes/batchaddscenes.json";
16219
+ return this.request("POST", addSceneUrl, JSON.stringify(cloneAddSceneParams)).then(function(result) {
16220
+ return result;
16221
+ });
16222
+ }
16223
+
16224
+ /**
16225
+ * @function SuperMap.iPortal.prototype.registerService
16226
+ * @description 注册服务。
16227
+ * @version 10.0.1
16228
+ * @param {SuperMap.iPortalRegisterServiceParam} registerParams - 注册服务的参数。
16229
+ * @returns {Promise} 返回包含注册服务结果的 Promise 对象。
16230
+ */
16231
+ registerService(registerParams) {
16232
+ if(!(registerParams instanceof iPortalRegisterServiceParam_IPortalRegisterServiceParam)) {
16233
+ this.getErrMsgPromise("registerParams is not instanceof IPortalRegisterServiceParam !");
16234
+ }
16235
+ let cloneRegisterParams = {
16236
+ type: registerParams.type,
16237
+ tags: registerParams.tags,
16238
+ authorizeSetting: registerParams.entities,
16239
+ metadata: registerParams.metadata,
16240
+ addedMapNames: registerParams.addedMapNames,
16241
+ addedSceneNames: registerParams.addedSceneNames
16242
+ }
16243
+ let registerUrl = this.iportalUrl + "/web/services.json";
16244
+ return this.request("POST", registerUrl, JSON.stringify(cloneRegisterParams)).then(result => {
16245
+ return result;
16246
+ });
16247
+ }
16248
+
16249
+ /**
16250
+ * @function SuperMap.iPortal.prototype.getErrMsgPromise
16251
+ * @description 获取包含错误信息的Promise对象。
16252
+ * @version 10.0.1
16253
+ * @param {String} errMsg - 传入的错误信息。
16254
+ * @returns {Promise} 返回包含错误信息的 Promise 对象。
16255
+ */
16256
+ getErrMsgPromise(errMsg) {
16257
+ return new Promise(resolve => {
16258
+ resolve(errMsg);
16259
+ })
16260
+ }
16111
16261
}
16112
16262
16113
16263
SuperMap.iPortalUser = iPortalUser_IPortalUser;
@@ -16131,6 +16281,10 @@ SuperMap.iPortalUser = iPortalUser_IPortalUser;
16131
16281
16132
16282
16133
16283
16284
+
16285
+
16286
+
16287
+
16134
16288
16135
16289
// CONCATENATED MODULE: ./src/common/iServer/CommonServiceBase.js
16136
16290
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
@@ -96642,6 +96796,8 @@ external_L_default.a.supermap.components.dataServiceQuery = dataServiceQueryView
96642
96796
/* concated harmony reexport IPortalShareEntity */__webpack_require__.d(__webpack_exports__, "IPortalShareEntity", function() { return iPortalShareEntity_IPortalShareEntity; });
96643
96797
/* concated harmony reexport IPortalServiceBase */__webpack_require__.d(__webpack_exports__, "IPortalServiceBase", function() { return iPortalServiceBase_IPortalServiceBase; });
96644
96798
/* concated harmony reexport IPortalUser */__webpack_require__.d(__webpack_exports__, "IPortalUser", function() { return iPortalUser_IPortalUser; });
96799
+ /* concated harmony reexport IPortalAddResourceParam */__webpack_require__.d(__webpack_exports__, "IPortalAddResourceParam", function() { return iPortalAddResourceParam_IPortalAddResourceParam; });
96800
+ /* concated harmony reexport IPortalRegisterServiceParam */__webpack_require__.d(__webpack_exports__, "IPortalRegisterServiceParam", function() { return iPortalRegisterServiceParam_IPortalRegisterServiceParam; });
96645
96801
/* concated harmony reexport Online */__webpack_require__.d(__webpack_exports__, "Online", function() { return Online_Online; });
96646
96802
/* concated harmony reexport OnlineData */__webpack_require__.d(__webpack_exports__, "OnlineData", function() { return OnlineData_OnlineData; });
96647
96803
/* concated harmony reexport OnlineQueryDatasParameter */__webpack_require__.d(__webpack_exports__, "OnlineQueryDatasParameter", function() { return OnlineQueryDatasParameter_OnlineQueryDatasParameter; });
0 commit comments