-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update plot_map
function for simple map plots using leaflet
and mapview
#291
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really nice, @gareth-j. Pity plot_map_mapview
doesn't plot filled polygons as the leaflet version. It did work for all my rasters except those rasters created by terra::rasterize
as it gave an error like
Error in loadNamespace(x) : there is no package called ‘stars’
A work-around is to apply raster::raster
, which makes it work without issues. plot_map_leaflet
worked just fine without this step.
Ah excellent, thanks for taking a look. I've just updated this PR to use the |
plot_map
function for simple map plots using leaflet
and mapview
This adds a new backend package to
plot_map
function which usesmapview
to plot raster and spatial data on a map. It allows very little customisation but is often more forgiving of data.plot_map
by default with useleaflet
and and still contains all the customisation features. The backend package can be selected usingbackend="leaflet"
orbackend="mapview"
.CHANGELOG.md
file if fixing a bug or adding a new featureDESCRIPTION