Returns the posted speed limit for a given road segment. In the case of road segments with variable speed limits, the default speed limit for the segment is returned. The speed limits service is only available to Google Maps API Premium Plan customers with an Asset Tracking license.
google_speedLimits(df_path = NULL, lat = NULL, lon = NULL,
placeIds = NULL, units = c("KPH", "MPH"), simplify = TRUE,
curl_proxy = NULL, key = get_api_key("roads"))
data.frame
with at least two columns specifying the
latitude & longitude coordinates, with a maximum of 100 pairs of coordinates.
string specifying the latitude column
string specifying the longitude column
vector of Place IDs of the road segments. Place IDs are returned in response to google_snapToRoads and google_nearestRoads reqeusts. You can pass up to 100 placeIds at a time
Whether to return speed limits in kilometers or miles per hour
logical
- TRUE indicates the returned JSON will be
coerced into a list. FALSE indicates the returend JSON will be returned as a string
a curl proxy object
string
A valid Google Developers Places API key