To eliminate dashed lines in React Native maps, you can set the lineDashPattern
property to null
or an empty array ([]
). This property controls the pattern of the dashed line, so setting it to null or an empty array will eliminate the dashed pattern altogether. You can do this either in the MapView.Polyline
component or in the Polyline
object you pass to it. For example:
<MapView>
<MapView.Polyline
coordinates={coordinates}
strokeColor="#0000FF"
strokeWidth={2}
lineDashPattern={null}
/>
</MapView>
Or
const polyline = {
coordinates: coordinates,
strokeColor: "#0000FF",
strokeWidth: 2,
lineDashPattern: []
};
<MapView>
<MapView.Polyline {...polyline} />
</MapView>
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-10-29 11:00:00 +0000
Seen: 15 times
Last updated: Mar 06 '23
What is the process to eliminate duplicate elements from an array?
How can I eliminate a network that has been deleted from a Docker container?
How can I eliminate deleted conda environments that still show up in jupyter-lab?
How can Flutter paginated datatable be modified to eliminate blank rows?
What is the process of incorporating maps into views using Sencha Touch 2?