The function will use spTransform
from the rgdal
package to automatically transform your
spatial data to the WGS84 geographic coordinate system. As this is the coordinate system required for mapping
with the leaflet
package, it can come in handy when mapping spatial objects in R.
1 | transform_xy(sp_object)
|
sp_object |
an R object of class |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.