MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / createTiandituSource

Method createTiandituSource

src/openlayers/mapping/WebMap.js:1352–1360  ·  view source on GitHub ↗

* @private * @function WebMap.prototype.createTiandituSource * @description 创建天地图的source。 * @param layerType 图层类型 * @param projection 地理坐标系 * @param isLabel 是否有路网图层 * @returns {Tianditu} 天地图的source

(layerType, projection, isLabel)

Source from the content-addressed store, hash-verified

1350 * @returns {Tianditu} 天地图的source
1351 */
1352 createTiandituSource(layerType, projection, isLabel) {
1353 let options = {
1354 layerType: layerType.split('_')[1].toLowerCase(),
1355 isLabel: isLabel || false,
1356 projection: projection,
1357 url: `https://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?tk=${this.tiandituKey}`
1358 };
1359 return new Tianditu(options);
1360 }
1361 /**
1362 * @private
1363 * @function WebMap.prototype.createBaiduSource

Callers 2

addBaseMapMethod · 0.95
createBaseLayerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected