* @private * @function WebMap.prototype.getDatasetsInfo * @description 获取数据集信息 * @param {string} serviceUrl 数据服务的地址 * @param {string} datasetName 数据服务的数据集名称 * @returns {Object} 数据服务的信息
(serviceUrl, datasetName)
| 4878 | * @returns {Object} 数据服务的信息 |
| 4879 | */ |
| 4880 | getDatasetsInfo(serviceUrl, datasetName) { |
| 4881 | let that = this; |
| 4882 | return that.getDatasources(serviceUrl).then(function (datasourceName) { |
| 4883 | //判断mvt服务是否可用 |
| 4884 | let url = `${serviceUrl}/data/datasources/${datasourceName}/datasets/${datasetName}.json`; |
| 4885 | return FetchRequest.get(that.getRequestUrl(url), null, { |
| 4886 | withCredentials: that.isCredentail(url) |
| 4887 | }) |
| 4888 | .then(function (response) { |
| 4889 | return response.json(); |
| 4890 | }) |
| 4891 | .then(function (datasetsInfo) { |
| 4892 | return { |
| 4893 | epsgCode: datasetsInfo.datasetInfo.prjCoordSys.epsgCode, |
| 4894 | bounds: datasetsInfo.datasetInfo.bounds, |
| 4895 | url //返回的是原始url,没有代理。因为用于请求mvt |
| 4896 | }; |
| 4897 | }); |
| 4898 | }); |
| 4899 | } |
| 4900 | |
| 4901 | /** |
| 4902 | * @private |
no test coverage detected