View source: R/supported_locations.R
supported_locations | R Documentation |
Find out what points are supported by the api.
The returned map name for a point can be used to determine what features are supported.
See also the map_info
.
supported_locations(locations)
locations |
One or more objects created by |
See https://docs.traveltime.com/api/reference/supported-locations/ for details
API response parsed as list and as a raw json
## Not run:
locationsDF <- data.frame(
id = c('Kaunas', 'London', 'Bangkok', 'Lisbon'),
lat = c(54.900008, 51.506756, 13.761866, 38.721869),
lng = c(23.957734, -0.128050, 100.544818, -9.138549)
)
locations <- apply(locationsDF, 1, function(x)
make_location(id = x['id'], coords = list(lat = as.numeric(x["lat"]),
lng = as.numeric(x["lng"]))))
supported_locations(unlist(locations, recursive = FALSE))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.