我已經開始使用https://github.com/airbnb/react-native-maps,並且沒有運氣從地圖上的數組座標數組繪製多段線。我不確定是否正確地傳入座標數組。React-Native-Maps如何繪製多段線
這是怎麼了渲染的折線:
{this.state.polylines.map(polyline => (
<MapView.Polyline
key={polyline.id}
coordinates={polyline.coordinates}
strokeColor="#000"
fillColor="rgba(255,0,0,0.5)"
strokeWidth={1}/>
))}
polyline.coordinates樣子:
[[lat,lng],[lat,lng],[lat,lng]]
感謝您的幫助/建議:d
你是怎麼弄到的緯度和液化天然氣的陣列??? [[lat,lng],[lat,lng]]。 。\ –