您好,抱歉,久等了,之前一直不敢确定,能不能加,现在才回复您。
是这样的,WebGL三维场景上支持添加WMTS服务的地图,如天地图的WMTS服务,或者超图iserver发布的WMTS服务等。具体加载方式请参考范例:
http://localhost:8090/iserver/iClient/for3D/webgl/examples/examples.html#,看天地图那个范例。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>天地图影像叠加WMTS</title>
<link href="../Build/Cesium/Widgets/widgets.css" rel="stylesheet">
<script type="text/javascript" src="./js/require.min.js" data-main="js/main"></script>
<style>
html, body, #cesiumContainer {
width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
}
</style>
</head>
<body>
<div id="cesiumContainer"></div>
<script>
function onload(Cesium) {
var viewer = new Cesium.Viewer('cesiumContainer', {
imageryProvider : new Cesium.WebMapTileServiceImageryProvider({
url : 'http://[subdomain].tianditu.com/img_w/wmts',
layer : 'img',
style : 'default',
format : 'tiles',
tileMatrixSetID : 'w',
credit : new Cesium.Credit('天地图全球影像服务'),
subdomains : ['t0','t1','t2','t3','t4','t5','t6','t7'],
maximumLevel : 18
})
});
var imageryLayers = viewer.imageryLayers;
var labelImagery = new Cesium.WebMapTileServiceImageryProvider({
url : 'http://[subdomain].tianditu.com/cia_w/wmts',
layer : 'cia',
style : 'default',
format : 'tiles',
tileMatrixSetID : 'w',
credit : new Cesium.Credit('天地图全球影像中文注记服务'),
subdomains : ['t0','t1','t2','t3','t4','t5','t6','t7']
});
imageryLayers.addImageryProvider(labelImagery);
}
</script>
</body>
</html>