Like this?

library(ggmap)
cap <- geocode("Capitol Building, Washington DC")
wash <- geocode("Washington Monument, Washington DC")
loc <- unlist((cap+wash)/2)
ggmap(get_map(location=loc,zoom=15))+coord_fixed(ylim=loc[2]+.005*c(-1,+1))
So this pulls in a map based on coords midway between the Capitol Building and the Washington Monument, then trims it by setting the ylim
.
The reason for unlist(...)
is that geocode(...)
returns a data frame and get_map(...)
wants a numeric vector.
EDIT Response to OP's comment.
coord_fixed(...)
forces an aspect ratio of 1:1, meaning that 1° of latitude is the same length as 1° of longitude. To get back the original aspect ratio from the map, use coord_map(...)
.
ggmap(get_map(location=loc,zoom=15))+coord_map(ylim=loc[2]+.005*c(-1,+1))
