I have a SpatialPolygonsDataFrame
[https://drive.google.com/file/d/0B5amt_a1FFXyZkd6eXF0czlReGc/view?usp=sharing] which is not projected. The spatial coordinates are range(long) = c(5e10 ; 8e10)
and range(lat) = c(1e7,3e7)
. I want to use the package leaflet
to display the map using:
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(data = polydf,
fillColor = ~pal(percent),
color = "#b2aeae"
popup = popup)
However, I only get the CartoDB.Positron
map, with no layer corresponding to the SpatialPolygonsDataFrame
. I think that I have to change the coordinates. I tried to set a custom CRS and then transforming it and got some very distorted display on my map. I could not find how to obtain the correct reference system.