修改地圖

dev
夜笙歌 8 months ago
parent 717bd2dcde
commit 46be72e013

@ -208,6 +208,7 @@ export default {
}, },
setPolyline1(e) { setPolyline1(e) {
polyline1 && map.remove(polyline1); polyline1 && map.remove(polyline1);
console.log(polyline1);
polyline1 = new AMap.Polyline({ polyline1 = new AMap.Polyline({
path: e, path: e,
strokeColor:'#000', strokeColor:'#000',
@ -250,8 +251,9 @@ export default {
return null return null
} }
}).filter(res => res) }).filter(res => res)
console.log(markersData);
this.setPolyline1(markersData.map(v => { this.setPolyline1(markersData.map(v => {
return v._position return v?._position ? v._position : []
})) }))
} else if (endMarker && startMarker) { } else if (endMarker && startMarker) {
startMarkerhs = e.target.hS startMarkerhs = e.target.hS

Loading…
Cancel
Save