Closed tomroh closed 3 years ago
The ability to use custom images is not available with makeSizeIcons but it is possible with icons & sizeNumeric.
makeSizeIcons
icons
sizeNumeric
height <- sizeNumeric(quakes$depth, baseSize = 20) width <- sizes * 38 / 95 symbols <- icons( iconUrl = 'http://leafletjs.com/examples/custom-icons/leaf-green.png', iconWidth = width, iconHeight = height) leaflet(quakes) %>% addTiles() %>% addMarkers(icon = symbols, lat = ~lat, lng = ~long) %>% addLegendImage(images ="http://leafletjs.com/examples/custom-icons/leaf-green.png", labels = "test",width = 38, height = 95, title = htmltools::tags$div('Leaf', style = 'font-size: 24px; text-align: center;'), position = 'topright')
e582544666375e70bf12638349b71f1ed2c683fb
The ability to use custom images is not available with
makeSizeIcons
but it is possible withicons
&sizeNumeric
.