I'm learning to program in R with the leaflet package. I want to give an angle to the icons, and am trying it with this code:
m <- leaflet()
m <- addTiles(m,urlTemplate = "http://xdworld.vworld.kr:8080/2d/Base/201310/{z}/{x}/{y}.png")
m = m %>% setView(127.074167,34.456806, zoom = 9)
arrowIcon <- makeIcon(
iconUrl = "arrow.png"
,iconWidth = 100, iconHeight = 100
,iconAnchorX = 25, iconAnchorY =25
)
arrowIcon <- makeIcon(
iconUrl = "ARROW_B2.png"
,iconWidth = 100, iconHeight = 100
,iconAnchorX = 25, iconAnchorY = 25
)
offset = 0.00 # zoom 10-> 0.03, 9->0.06, 8 -> 0.12, 7 -> 0.24
m_lat = 34.45 + offset
m_lon = 127.07 - offset
m <- addMarkers(m, lng=m_lon, lat= m_lat
, options = c( markerOptions(), iconAngle= 0)
,icon= arrowIcon)
m <- addCircles(m, lng=127.07, lat=34.45 , weight = 10,radius = 100)
m
However, it does not work.