You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When zooming out, the polygons added by addPolygons seem to be not fitting, i.e., as if they were not filled completely. Zooming in resolves the problem (gradually).
Here is a reproducible example:
library(leaflet)
states<-geojsonio::geojson_read("https://rstudio.github.io/leaflet/json/us-states.geojson", what="sp")
#> Registered S3 method overwritten by 'geojsonsf':#> method from #> print.geojson geojson
leaflet() |> setView(-96, 37.8, 4) |> addPolygons(data=states, fillColor="red", weight=0)
#> Error trying to find path to Chrome
Hey, I also had this issue and found a solution which worked for me. Found here. I needed to include addPolygons( ... , smoothFactor = 0) and the slivers disappeared. I hope that works for you, too.
When zooming out, the polygons added by
addPolygons
seem to be not fitting, i.e., as if they were not filled completely. Zooming in resolves the problem (gradually).Here is a reproducible example:
Created on 2022-12-07 with reprex v2.0.2
You can see the small white areas around some of the state borders.
The text was updated successfully, but these errors were encountered: