I love map and marine lasures. Fortunately, I have two ships at different location. A motor boat (24ft from made in Florida) kept in a marina near Tokyo Disney Land; saling yacht (32ft French one) kept at a marina facing a beautifl outer water about 1.5 hrs from Tokyo. Below is a plot created with leaflet using two differnet type of icons representing the boast. Hitting each of icon pop-ups the name of them. ### ploting with leaflet
shipIcon <- iconList(yacht=makeIcon(
iconUrl = "http://jp.seaicons.com/wp-content/uploads/2015/11/Transport-Sail-Boat-icon.png",
iconWidth = 31*215/230, iconHeight = 31,
iconAnchorX = 31*215/230/2, iconAnchorY = 16
),
boat=makeIcon(iconUrl = "https://d30y9cdsu7xlg0.cloudfront.net/png/7875-200.png",
iconWidth = 31*215/230, iconHeight = 31,
iconAnchorX = 31*215/230/2, iconAnchorY = 16
))
MarinaLatLong <- data.frame(
lat = c(35+37/60+43.90/60/60,35+9/60+19.39/60/60),
lng = c(139+53/60+51.83/60/60,139+37/60+4.49/60/60),
type=c("boat","yacht"))
boatName<-c("sendo.net2","marionette")
MarinaLatLong %>%
leaflet() %>%
addTiles() %>%
addMarkers(icon= ~shipIcon[type],popup=boatName)
## Assuming 'lng' and 'lat' are longitude and latitude, respectively