注意http和https的问题
天地图
//底图
'https://t1.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd',
'https://t2.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd',
// 注记
'https://t1.tianditu.gov.cn/DataServer?T=cia_w&X={x}&Y={y}&L={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd',// 天地图矢量图:
'https://t6.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd',
// 天地图矢量注记:
'https://t2.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd',
// 天地图遥感图:
'https://t3.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd',
// 天地图遥感注记:
'https://t2.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd',// 天地图影像注记Url
'https://basemaps.geosceneonline.cn/t/cia_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cia&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}',
// 底图Url
'https://basemaps.geosceneonline.cn/t/img_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=img&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}',// 天地图地形地图 注记Url
'https://basemaps.geosceneonline.cn/t/cta_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cta&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}',
// 天地图地形地图 底图Url
'https://basemaps.geosceneonline.cn/t/ter_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=ter&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}',(1)使用天地图,需要申请浏览器端的许可(申请地址:http://lbs.tianditu.gov.cn/);
(2)以上服务地址中的可选域地址(地址中{s}的可选值)为 ['0', '1', '2', '3', '4', '5', '6', '7']。
2. 高德地图
// 矢量图
// 'https://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
// 影像图地图
// 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
// 影像图标注
// 'https://webst02.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}',
// 实时路况
// 'https://tm.amap.com/trafficengine/mapabc/traffictile?v=1.0&;t=1&x={x}&y={y}&z={z}&&t={time}'
// 备注:高德地图服务中的可选域地址为["1", "2", "3", "4"],实时路况中的/时间参数获取方式为 time = new Date().getTime()。
5. 腾讯地图
'https://rt2.map.gtimg.com/realtimerender?z={z}&x={x}&y={y}&type=vector&style=0',
'https://rt1.map.gtimg.com/tile?z={z}&x={x}&y={y}&styleid=2&version=376',
'https://rt0.map.gtimg.com/tile?z={z}&x={x}&y={y}&type=vector&styleid=3&version=376'
'https://p2.map.gtimg.com/demTiles/{z}/{x16}/{y16}/{x}_{y}.jpg',
'https://rt2.map.gtimg.com/tile?z={z}&x={x}&y={y}&type=vector&styleid=3&version=376',
备注:腾讯地图服务的可选域包括[‘0’, ‘1’, ‘2’]。
OpenStreetMap
https://{s}.tile.osm.org/{z}/{x}/{y}.png,可选域包括[‘a’, ‘b’, ‘c’]
arcgis/Geoq/ESRI
服务为ArcGIS Server发布的WMTS地图服务,可从智图(https://www.geoq.cn/)或arcgisonline(https://cache1.arcgisonline.cn/ArcGIS/rest/services)调用,效果是一样的。'https://cache1.arcgisonline.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}',
'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}',
'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}',
'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer/tile/{z}/{y}/{x}',
'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer/tile/{z}/{y}/{x}',
'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',// World Ocean Base Basemap
"https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}",Cesium加载:
viewer.imageryLayers.addImageryProvider(new Cesium.ArcGisMapServerImageryProvider({url : 'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer',url : 'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer',url : 'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer',url : 'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer',url : "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",}));
UrlTemplateImageryProvider加载xyz的时候如下:注意是z/y/x
viewer.imageryLayers.addImageryProvider(new Cesium.UrlTemplateImageryProvider({url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", //服务地址format: "image/png",})// new Cesium.ArcGisMapServerImageryProvider({// url : 'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer',// url : 'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer',// url : 'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer',// url : 'https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer',// url : "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",// }));
一个4326的影像瓦片服务
_viewer.imageryLayers.addImageryProvider(new Cesium.UrlTemplateImageryProvider({url: 'https://wi.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',format: 'image/png',tilingScheme: new Cesium.GeographicTilingScheme(),
}))