Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gmap

Plot a map using extend of a spatial object


Description

Uses get_map() to query map services like Google Maps for a region centered around the spatial object provided. Then calls ggmap() to plot the map.

Usage

gmap(data, ...)

Arguments

data

A Spatial* object.

...

Arguments passed on to get_map().

Details

This function requires the ggmap package.

Value

a ggplot object

Examples

## Not run: 
# Load the Gorilla data
data(gorillas, package = "inlabru")

# Create a base map centered around the nests and plot the boundary as well
# as the nests
ggplot() +
  gg(gorillas$boundary) +
  gg(gorillas$nests, color = "white", size = 0.5)
if (requireNamespace("ggmap", quietly = TRUE)) {
  gmap(gorillas$nests, maptype = "satellite") +
  gm(gorillas$boundary) +
  gm(gorillas$nests, color = "white", size = 0.5)
}

## End(Not run)

inlabru

Bayesian Latent Gaussian Modelling using INLA and Extensions

v2.3.1
GPL (>= 2)
Authors
Finn Lindgren [aut, cre, cph] (<https://orcid.org/0000-0002-5833-2011>, Finn Lindgren continued development of the main code), Fabian E. Bachl [aut, cph] (Fabian Bachl wrote the main code), David L. Borchers [ctb, dtc, cph] (David Borchers wrote code for Gorilla data import and sampling, multiplot tool), Daniel Simpson [ctb, cph] (Daniel Simpson wrote the basic LGCP sampling method), Lindesay Scott-Howard [ctb, dtc, cph] (Lindesay Scott-Howard provided MRSea data import code), Seaton Andy [ctb] (Andy Seaton provided testing and bugfixes)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.