walkerke / mapboxapi

R interface to Mapbox web services
https://walker-data.com/mapboxapi/
Other
110 stars 8 forks source link

fix issue created by #18 importing ggspatial (w/o adding ggspatial to Imports) #20

Closed elipousson closed 2 years ago

elipousson commented 2 years ago

I realized my last pull request introduced an error when running devtools::check() because it was importing ggspatial::layer_spatial but had kept ggspatial under Suggests. I added a check using rlang::check_installed() so the package can keep ggspatial under Suggests and avoid the need to have the package under Imports.

I also made several minor improvements to static_mapbox:

If you are OK with it, I'd also like to implement the attribution and logo parameters supported by the Mapbox static maps API. I can add that change to this pull request or a separate one after this is merged (since it may make sense to implement the same option to show or hide attribute to the addMapboxTiles function at the same time).

walkerke commented 2 years ago

looks good, thanks! yes, attribution would be great. I typically take care of that as a map caption which isn't always ideal so having that come through on the map itself would be helpful.