Skip to content

Commit

Permalink
adapt new sf-0.9 way to retrieve proj4string. #271
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-salabim committed Mar 20, 2020
1 parent 7abf070 commit 813e4bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/mapviewControls.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

2 comments on commit 813e4bb

@edzer
Copy link
Member

@edzer edzer commented on 813e4bb Mar 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the double quotes.

@tim-salabim
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oha, yes my bad!

Please sign in to comment.