16EAGLE / basemaps

A lightweight package for accessing basemaps from open sources in R 🗺️
https://jakob.schwalb-willmann.de/basemaps
GNU General Public License v3.0
57 stars 15 forks source link

Error using basemap_ggplot(ext) function #13

Closed alv-garcia closed 1 year ago

alv-garcia commented 1 year ago

Trying to use the example code of the basemap_ggplot(ext) function exposed on the homepage(https://jakob.schwalb-willmann.de/basemaps/), the error below appeared and the ggplot object could not be created

Terminal message:

basemap_ggplot(ext) Warning: Transforming 'ext' to Web Mercator (EPSG: 3857), since 'ext' has a different CRS. The CRS of the returned basemap will be Web Mercator, which is the default CRS used by the supported tile services. Loading basemap 'topographic' from map service 'osm'... Error in as.data.frame.default(r, xy = T) : cannot coerce class ‘structure("SpatRaster", package = "terra")’ to a data.frame

16EAGLE commented 1 year ago

Unfortunately, I cannot reproduce this issue. The examples are working fine on my end and in the test environments. Maybe its an issue with an outdated dependency? You could try to update all packages that basemaps depends on and reinstall the most recent version of basemaps – maybe this solves the issue!

16EAGLE commented 1 year ago

Please reopen if the issue persists.