https://rstudio.github.io/leaflet/map_widget.html

https://rstudio.github.io/leaflet/map_widget.html
Based on this tutorial, is there another way to avoid having squares stretched into rectangles than elide(SpP, scale = 1)?
library(leaflet)
Sr = Polygon(cbind(c(5, 6, 6, 5, 5), 80 + c(4, 4, 3, 3, 4)), hole = TRUE)
srs = Polygons(list(Sr), ID = 'square')
SpP = SpatialPolygons(list(srs))
leaflet(height = '300px') %>% addPolygons(data = SpP)
plus80
It's even worse if 80 is replaced by 100. Thanks.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.