Giving the example:


coordinates(meuse) <- ~x+y
proj4string(meuse) <- CRS("+init=epsg:28992")
mapview(meuse, cex = "cadmium", legend = TRUE)

I was expecting that legend=TRUE will display a legend with graduated circles, something similar like in this link. Is there a way to achieve this in mapview?

1 Answer 1


Can't be (easily) done with the current versions. mapview uses leaflet::addLegend which can only show a colour palette for a legend.

This issue has been sitting in the issue tracker since October 2016, so don't hold your breath waiting for it:


and an earlier request from 2015, tagged P1, from 2015:


Perhaps if you comment on those issues it might ping something at RStudio for them to implement it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.