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

Method getDataService

src/openlayers/mapping/WebMap.js:4395–4408  ·  view source on GitHub ↗

* @private * @function WebMap.prototype.getDataService * @description 获取上传的数据信息 * @param {string} fileId - 文件id * @param {string} datasetName 数据服务的数据集名称 * @returns {Promise } 数据的信息

(fileId, datasetName)

Source from the content-addressed store, hash-verified

4393 * @returns {Promise<T | never>} 数据的信息
4394 */
4395 getDataService(fileId, datasetName) {
4396 let url = this.getRequestUrl(`${this.server}web/datas/${fileId}.json`);
4397 return FetchRequest.get(url, null, {
4398 withCredentials: this.isCredentail(url)
4399 })
4400 .then(function (response) {
4401 return response.json();
4402 })
4403 .then(function (result) {
4404 result.fileId = fileId;
4405 result.datasetName = datasetName;
4406 return result;
4407 });
4408 }
4409
4410 /**
4411 * 请求是否带上cookie

Callers 1

addLayersMethod · 0.80

Calls 3

getRequestUrlMethod · 0.95
isCredentailMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected