| | |
| | | //加载历史影像 |
| | | export function addHistoryLayer(name) { |
| | | const layerName = name; |
| | | if (_GLOBAL.historyLayer) { |
| | | window.mapapi.removeLayer(_GLOBAL.historyLayer) |
| | | } |
| | | _GLOBAL.historyLayer = new ol.layer.Tile({ |
| | | source: new ol.source.XYZ({ |
| | | url: `https://skyzt.bda.gov.cn/yzAdapter/Vector/?request=1&year=${layerName}&type=Sate&level={z}&x={x}&y={y}`, |
| | |
| | | // console.log(points, '点位测试') |
| | | // _marker = createGPSMarker(points, _rotate); |
| | | // window.mapapi.addLayer(_marker) |
| | | |
| | | |
| | | if (navigator.geolocation) { |
| | | navigator.geolocation.watchPosition((res) => { |
| | | let lat = res.coords.latitude; |