From 813e4bb13024f92a151fa21f66e5e561bf7c0ad0 Mon Sep 17 00:00:00 2001 From: tim-salabim Date: Fri, 20 Mar 2020 17:32:06 +0100 Subject: [PATCH] adapt new sf-0.9 way to retrieve proj4string. #271 --- R/mapviewControls.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/mapviewControls.R b/R/mapviewControls.R index 7a29802f2..22e9119f5 100644 --- a/R/mapviewControls.R +++ b/R/mapviewControls.R @@ -193,7 +193,7 @@ getProjection <- function(x) { if (inherits(x, c("Raster", "Spatial"))) { prj <- raster::projection(x) } else { - prj <- sf::st_crs(x)[["proj4string"]] + prj <- sf::st_crs(x)$"proj4string" } return(prj)