# NOT RUN {
library(sp)
coords1 <- cbind(c(2, 4, 4, 1, 2), c(2, 3, 5, 4, 2))
sln1 <- coords2Lines(coords1, ID = "A")
coords2 <- cbind(c(5, 4, 2, 5), c(2, 3, 2, 2))
sln2 <- coords2Lines(coords2, ID = "B")
mapview(sln1)
plot(sln1, col = "grey75")
plot(sln2, col = "grey25", add = TRUE)
# }
Run the code above in your browser using DataLab