supported_locations {traveltimeR}R Documentation

Supported Locations

Description

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.

Usage

supported_locations(locations)

Arguments

locations

One or more objects created by make_location

Details

See https://docs.traveltime.com/api/reference/supported-locations/ for details

Value

API response parsed as list and as a raw json

Examples

## 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)

[Package traveltimeR version 1.2.1 Index]