Douglas Walker Douglas Walker - 1 year ago 762
React JSX Question

React-Native-Maps how to draw polylines

I've started using and having no luck drawing polylines from an array of array coordinates on the map.

I am not sure if I'm passing in the array of coordinates correctly.

this is how I am rendering the polyline:

{ => (

polyline.coordinates looks like:


Thank you for any help/advice :D

Answer Source

I think the coordinates must be an array of type LatLng as it is documented in the API.

How LatLng objects are created can be found in the component MapMarker for example. Here you can find the source code (linked to the relevant line) and the component API.

Hope this will help you,

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download