|
@@ -64,8 +64,23 @@ export function useAMap(options) {
|
|
if (type === 'vectorgraph') {
|
|
if (type === 'vectorgraph') {
|
|
map.removeLayer(nowLayer);
|
|
map.removeLayer(nowLayer);
|
|
} else if (type === 'satellite') {
|
|
} else if (type === 'satellite') {
|
|
- const satellite = new AMap.TileLayer.Satellite();
|
|
|
|
- map.addLayer(satellite);
|
|
|
|
|
|
+ const satellite = new AMap.TileLayer.WMTS({
|
|
|
|
+ // url: 'http://t0.tianditu.gov.cn/img_c/wmts',
|
|
|
|
+ url: 'http://t4.tianditu.gov.cn/img_w/wmts',
|
|
|
|
+ blend: false,
|
|
|
|
+ tileSize: 256,
|
|
|
|
+ params: {
|
|
|
|
+ Layer: 'img',
|
|
|
|
+ Version: '1.0.0',
|
|
|
|
+ Format: 'tiles',
|
|
|
|
+ TileMatrixSet: 'w',
|
|
|
|
+ STYLE: 'default',
|
|
|
|
+ tk: 'a8df87f1695d224d2679aa805c1268d9' // 申请的天地图开发者key
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ satellite.setMap(map);
|
|
|
|
+ // const satellite = new AMap.TileLayer.Satellite();
|
|
|
|
+ // map.addLayer(satellite);
|
|
nowLayer = satellite;
|
|
nowLayer = satellite;
|
|
}
|
|
}
|
|
};
|
|
};
|