Closed amegbor closed 7 months ago
#> Attaching package: 'fields' #> The following object is masked from 'package:leaflet': #> #> addLegend
The {fields}
package has its own addLegend
function.
Please use leaflet::addLegend(pal=pal, position="bottomleft")
to get around this error.
Thank you for the clarification, Schloerke. I overlooked that particular warning or information in the Fields package.
Hello,
I encountered an issue while attempting to incorporate a legend into my Leaflet map. The error message received is: "Error in addLegend(., pal = pal, position = "bottomleft") : unused arguments (pal = pal, position = "bottomleft")."
Interestingly, the Leaflet map functions properly when the addLegend option is omitted. Please see the reproducible example using a sample code and data from https://edzer.github.io/sdsr_exercises/12.html
Created on 2024-02-19 with reprex v2.1.0