make_location {traveltimeR}R Documentation

Location objects constructor

Description

Define your locations to use later in departure_searches or arrival_searches.

Usage

make_location(id, coords)

Arguments

id

You will have to reference this id in your searches. It will also be used in the response body. MUST be unique among all locations.

coords

Location coordinates. Must use this format: list(lat = 0, lng = 0)

Details

See https://docs.traveltime.com/api/reference/distance-matrix for details

Value

A data.frame wrapped in a list. It is constructed in a way that allows jsonlite::toJSON to correctly transform it into a valid request body

See Also

See time_filter for usage examples


[Package traveltimeR version 1.2.1 Index]