| | |
| | | import Pagination from '@/components/common/Pagination' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import AMapLoader from '@amap/amap-jsapi-loader' |
| | | import greenIcon from '@/assets/icons/location-green.png' |
| | | import blueIcon from '@/assets/icons/location-blue.png' |
| | | import redIcon from '@/assets/icons/location-red.png' |
| | | export default { |
| | |
| | | var allsteps = [] |
| | | allsteps.push([item.startLogitude, item.startLatitude]) |
| | | const steps = (item.steps || '').split(';') |
| | | if (index != that.dataList.length - 1 || true) { |
| | | if (index != that.dataList.length - 1) { |
| | | steps.forEach(item1 => { |
| | | const ll = (item1 || '').split(',') |
| | | allsteps.push(ll) |
| | |
| | | |
| | | const icon = new AMap.Icon({ |
| | | size: new AMap.Size(30, 50), // 图标尺寸 |
| | | image: index === 0 ? redIcon : blueIcon |
| | | image: index === 0 ? greenIcon : (index === that.dataList.length - 1 ? redIcon : blueIcon) |
| | | }) |
| | | |
| | | console.log("=====index====",index) |
| | | var marker = new AMap.Marker({ |
| | | position: new AMap.LngLat(item.startLogitude, item.startLatitude), |
| | | icon: index === 0 ? redIcon : blueIcon, |
| | | icon: icon, |
| | | anchor: 'bottom-center', |
| | | offset: new AMap.Pixel(0, 0) |
| | | }) |