Concept of ggmap seems clear to me:
Use
get_map
to obtain a map at a certain location at a certain spatial zoom.Use
ggmap() + ggplot()
to combine map image withggplot
graphics.
The challenge at the moment lies in step 1 and, precisely, location
parameter. Besides a longitude/latitude pair get_map
accepts a character string, but no vector. It seems that there is no easy way to obtain a map that includes two or more states, or two or more cities.
Thus, to have a function that draws arbitrary number of (presumably adjacent) US states there is no shortcut but to go through elaborate process of geocoding each state and calculating optimal location and zoom (also not sure how).