I thought it would be an easy fix to use annotation_map_tile() for basemap for the hexbinning exercise instead of ggmap() but it seems to not communicate coordinates.
I've tried:
coord_cartesian() and coord_equal()
converting to SpatialPointsDataframe
adding a sf polygon to bind it
No success.... any ideas?
OR we could try to export the hex from ggplot as a raster, and add to leaflet, like we do with the KDE map in Week 5?
Fixed this, in case of interest to note, I had to pass the correctly projected spatial df in the leaflet() argument, rather than in the bin layer, because annotation_map_tile() inherits the projection from there.
I thought it would be an easy fix to use annotation_map_tile() for basemap for the hexbinning exercise instead of ggmap() but it seems to not communicate coordinates.
I've tried: coord_cartesian() and coord_equal() converting to SpatialPointsDataframe adding a sf polygon to bind it
No success.... any ideas?
OR we could try to export the hex from ggplot as a raster, and add to leaflet, like we do with the KDE map in Week 5?