废话不多说直接上代码
var viewer = new Cesium.Viewer("cesiumContainer", {
animation: false,
baseLayerPicker: false,
geocoder: true,
timeline: false,
sceneModePicker: true,
navigationHelpButton: false,
infoBox: true
});
var layer = new Cesium.WebMapTileServiceImageryProvider({
url: "http://t0.tianditu.gov.cn/img_w/wmts?tk=你的Key",
layer: "img",
style: "default",
tileMatrixSetID: "w",
format: "tiles",
maximumLevel: 18
});
viewer.imageryLayers.addImageryProvider(layer);
var layer1 = new Cesium.WebMapTileServiceImageryProvider({
url: "http://t0.tianditu.gov.cn/cia_w/wmts?tk=你的Key",
layer: "cia",
style: "default",
tileMatrixSetID: "w",
format: "tiles",
maximumLevel: 18
});
viewer.imageryLayers.addImageryProvider(layer1);
效果