If you are interested in another mapping library, then googleway uses Google Maps, which in my experience is better at handling lines that cross the date line.
Notes
- To use Google Maps you need an API key
- Currently only
sf objects are supported, not sp
- This will also work in shiny; I'm just showing you the basic map here
- I authored
googleway
library(sf)
library(googleway)
## convert the sp object to sf
sf <- sf::st_as_sf(df2)
set_key("your_api_key")
google_map() %>%
add_polylines(data = sf)