update
1.优化
This commit is contained in:
@@ -200,12 +200,12 @@
|
||||
Map.map.on('moveend', logMapinfo);
|
||||
return;
|
||||
}
|
||||
if (TabType.zhiShengJi == item.type) {
|
||||
Map.createAircraft(aircraft);
|
||||
return;
|
||||
} else {
|
||||
getMapData(item.type, { type: item.type });
|
||||
}
|
||||
// if (TabType.zhiShengJi == item.type) {
|
||||
// Map.createAircraft(aircraft);
|
||||
// return;
|
||||
// } else {
|
||||
// getMapData(item.type, { type: item.type });
|
||||
// }
|
||||
}
|
||||
|
||||
function watchInfoChangeTab(item: any) {
|
||||
@@ -238,14 +238,12 @@
|
||||
// console.log('绘制驾车路线完成');
|
||||
searchFlag.value = false;
|
||||
} else {
|
||||
console.log('获取驾车数据失败:', result);
|
||||
searchFlag.value = false;
|
||||
}
|
||||
});
|
||||
AMap.Event.addListener(driving, 'complete', (res) => {
|
||||
const data = JSON.parse(JSON.stringify(res));
|
||||
searchFlag.value = false;
|
||||
console.log('查询结果', data);
|
||||
if (data.info == 'OK') {
|
||||
const { routes } = data;
|
||||
setTitle(routes[0]);
|
||||
@@ -263,7 +261,6 @@
|
||||
|
||||
async function getMapData(type, params = { type: '' }) {
|
||||
try {
|
||||
console.log(type, params, 'asghujis');
|
||||
const { code, result } = await mapApiSwitch(type, params);
|
||||
if (code == 200) {
|
||||
if (Array.isArray(result) && result.length > 0) {
|
||||
@@ -339,7 +336,6 @@
|
||||
}
|
||||
|
||||
function drawMarker(data: any) {
|
||||
console.log(data);
|
||||
const { lon, lat } = data;
|
||||
if (!lon || !lat) {
|
||||
Map.clearMarker();
|
||||
|
||||
Reference in New Issue
Block a user