readDataShapefile <- function(dirPath, layer) {
readOGR(dsn = dirPath, layer = layer, encoding = "UTF-8", verbose = F)
}
readDataGeojson <- function(geojsonPath) {
readOGR(geojsonPath, "OGRGeoJSON", verbose = F)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.