Learn R Programming

prettymapr (version 0.2.5)

searchbbox: Query The Interwebs For A Bounding Box

Description

Use the PickPoint.io API or Google API to retreive a bounding box for the given query. Note that if you would like to use google as a source, you must agree to the Google API terms and conditions.

Usage

searchbbox(querystring, ...)

Value

A 2x2 matrix describing a bounding box like that returned by sp::bbox()

Arguments

querystring

The search query. Passing a vector in will find the bounding box that contains all bounding boxes returned.

...

Additional paramters to be passed on to geocode. Passing source="google" may be useful if google is desired as a source. Use options(prettymapr.geosource="google") to permanently use google as a source.

Examples

Run this code
if (FALSE) { # identical(Sys.getenv("R_PRETTYMAPR_HAS_API_KEY"), "true")
#don't test to speed up checking time
# \donttest{
searchbbox("kings county, NS")
searchbbox("University Ave. Wolfville NS", source="google")
searchbbox("Wolfville ns", source="google")
searchbbox(c("Vermont", "Nova Scotia"))
# }
}

Run the code above in your browser using DataLab