Browse Source

🚑 交接点没有地图数据也能展示处理

master
wangxiang 3 years ago
parent
commit
7f659ecb9f
  1. 5
      src/components/AMap/src/AMapDesigner/index.vue

5
src/components/AMap/src/AMapDesigner/index.vue

@ -747,8 +747,9 @@
/** 绘制地图导航路线 */ /** 绘制地图导航路线 */
function drawMapNavigate(points: MapLogisticPoint[] = []) { function drawMapNavigate(points: MapLogisticPoint[] = []) {
if (isEmpty(points) && mapState.mapData.courierUserId && mapState.mapData.courierLng && mapState.mapData.courierLat) return notification.warn({ if (isEmpty(points) && mapState.mapData.courierUserId && mapState.mapData.courierLng && mapState.mapData.courierLat) return notification.warn({
message: '检查到当前起点数据为空或标记点集合为空,请选择起点!', message: '检查到当前起点数据为空或标记点集合为空,请先选择起点跟发单!',
duration: 2 duration: 2,
placement: 'topLeft'
}); });
points = points.filter(item => item.lng && item.lat); points = points.filter(item => item.lng && item.lat);
const lngLats = points.map(item => new AMap.LngLat(item.lng, item.lat)); const lngLats = points.map(item => new AMap.LngLat(item.lng, item.lat));

Loading…
Cancel
Save