* @private * @function WebMap.prototype.getDataService * @description 获取上传的数据信息 * @param {string} fileId - 文件id * @param {string} datasetName 数据服务的数据集名称 * @returns {Promise } 数据的信息
(fileId, datasetName)
| 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 |
no test coverage detected