public interface MatrixService
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<MatrixResponse> |
getCall(java.lang.String userAgent,
java.lang.String user,
java.lang.String profile,
java.lang.String coordinates,
java.lang.String accessToken,
java.lang.String annotations,
java.lang.String approaches,
java.lang.String destinations,
java.lang.String sources)
Call-based interface.
|
@GET(value="directions-matrix/v1/{user}/{profile}/{coordinates}") retrofit2.Call<MatrixResponse> getCall(@Header(value="User-Agent") java.lang.String userAgent, @Path(value="user") java.lang.String user, @Path(value="profile") java.lang.String profile, @Path(value="coordinates") java.lang.String coordinates, @Query(value="access_token") java.lang.String accessToken, @Query(value="annotations") java.lang.String annotations, @Query(value="approaches") java.lang.String approaches, @Query(value="destinations") java.lang.String destinations, @Query(value="sources") java.lang.String sources)
userAgent
- the useruser
- the userprofile
- the profile directions should usecoordinates
- the coordinates the route should followaccessToken
- Mapbox access tokenannotations
- Used to specify the resulting matrices.
Possible values are: duration (default),
distance, or both values separated by commaapproaches
- A semicolon-separated list indicating the side of the road from
which to approach waypoints in a requested route.
Accepts unrestricted (default, route can arrive at the waypoint
from either side of the road) or curb (route will arrive at
the waypoint on the driving_side of the region).
If provided, the number of approaches must be the same
as the number of waypoints.
However, you can skip a coordinate and
show its position in the list with the ; separator.destinations
- array of waypoint objects. Each waypoints is an input coordinate snapped to
the road and path network. The waypoints appear in the array in the order
of the input coordinates, or in the order as specified in the destinations
query parametersources
- array of waypoint objects. Each waypoints is an input coordinate snapped to
the road and path network. The waypoints appear in the array in the order
of the input coordinates, or in the order as specified in the sources query
parameterMatrixResponse
in a Call wrapper