* @private * @function WebMap.prototype.getDatasources * @description 获取关系型文件发布的数据服务中数据源的名称 * @param {string} url - 获取数据源信息的url * @returns {Promise } 数据源名称
(url)
| 4372 | * @returns {Promise<T | never>} 数据源名称 |
| 4373 | */ |
| 4374 | getDatasources(url) { |
| 4375 | let requestUrl = this.getRequestUrl(`${url}/data/datasources.json`); |
| 4376 | return FetchRequest.get(requestUrl, null, { |
| 4377 | withCredentials: this.isCredentail(requestUrl) |
| 4378 | }) |
| 4379 | .then(function (response) { |
| 4380 | return response.json(); |
| 4381 | }) |
| 4382 | .then(function (datasource) { |
| 4383 | let datasourceNames = datasource.datasourceNames; |
| 4384 | return datasourceNames[0]; |
| 4385 | }); |
| 4386 | } |
| 4387 | /** |
| 4388 | * @private |
| 4389 | * @function WebMap.prototype.getDataService |
no test coverage detected