googleMap: Display a point on earth on a Google Map

View source: R/rgeo.R

googleMapR Documentation

Display a point on earth on a Google Map

Description

Creates a URL for Google Maps for a particular latitude and longitude position. This function has been deprecated due to changes in Google's access policies. Give leaflet_map() a try as an alternative.

Usage

googleMap(
  latitude,
  longitude,
  position = NULL,
  zoom = 12,
  maptype = c("roadmap", "satellite", "terrain", "hybrid"),
  mark = FALSE,
  radius = 0,
  browse = TRUE,
  ...
)

Arguments

latitude, longitude

vectors of latitude and longitude values

position

a data frame containing latitude and longitude positions

zoom

zoom level for initial map (1-20)

maptype

one of 'roadmap', 'satellite', 'terrain', and 'hybrid'

mark

a logical indicating whether the location should be marked with a pin

radius

a vector of radii of circles centered at position that are displayed on the map

browse

a logical indicating whether the URL should be browsed (else only returned as a string)

...

additional arguments passed to browseURL

Value

a string containing a URL. Optionally, as a side-effect, the URL is visited in a browser

See Also

leaflet_map(), deg2rad(), latlon2xyz() and rgeo().

Examples

## Not run: 
googleMap(40.7566, -73.9863, radius=1)   # Times Square
googleMap(position=rgeo(2), radius=1)    # 2 random locations

## End(Not run)

mosaic documentation built on May 29, 2024, 5:27 a.m.