View source: R/mp_get_bounds.R
mp_get_bounds | R Documentation |
Extract geocoded *bounds* from Google Maps Geocode API response
mp_get_bounds(doc)
doc |
XML document with Google Maps Geocode API response |
sf
Polygonal layer representing bounds of geocoded locations. In cases when there is more than one response per address, only first response is considered.
# Built-in reponse example
library(xml2)
doc = list("Tel-Aviv" = as_xml_document(response_geocode))
b = mp_get_bounds(doc)
## Not run:
# Text file with API key
key = readLines("~/key")
# Get bounds
doc = mp_geocode(addresses = c("Tel-Aviv", "Rehovot", "Beer-Sheva"), region = "il", key = key)
b = mp_get_bounds(doc)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.