To download and use Google maps of an area, follow these steps:
- Load the RgoogleMaps package:
- Determine the latitude and longitude of the location for which you need a map. In this recipe, you will get the map for the neighborhood of Seton Hall University in New Jersey, USA. The location is (lat, long) = (40.742634, -74.246215).
- Get the static map from Google Maps and then plot it as follows. The output of the map is shown after the code:
> shu.map <- GetMap(center = c(40.742634, -74.246215), zoom=17) > PlotOnStaticMap(shu.map)