matrix

fun matrix(request: MatrixRequest): MatrixResponse

Computes a matrix of costs and times between every source and every target.

This is Valhalla's sources_to_targets action. The response reports only distance and time between each source/target pair, never geometry — request route separately for the shape of any specific connection you need to draw.

Throws

if the Valhalla engine returns an error response.

if the response JSON cannot be parsed.