Interface MasstransitRouter

com.yandex.mapkit.transport.masstransit

public interface MasstransitRouter

Provides methods for submitting mass transit routing requests.

Methods

Session requestRoutes(@NonNull List< RequestPoint > points, @NonNull MasstransitOptions masstransitOptions, @NonNull RouteListener routeListener)

Submits a request to find mass transit routes.

SummarySession requestRoutesSummary(@NonNull List< RequestPoint > points, @NonNull MasstransitOptions masstransitOptions, @NonNull SummaryListener summaryListener)

Submits a request to fetch a brief summary of a mass transit route.

Session resolveUri(@NonNull String uri, @NonNull TimeOptions timeOptions, @NonNull RouteListener routeListener)

Submits a request to retrieve detailed information on a mass transit route by URI.

MasstransitRouteSerializer routeSerializer()

Returns a route serializer instance.

Method Detail

requestRoutes

public Session requestRoutes (@NonNull List< RequestPoint > points, @NonNull MasstransitOptions masstransitOptions, @NonNull RouteListener routeListener)

Submits a request to find mass transit routes.

Parameters:
points

Route points (See RequestPoint for details). Currently only two points are supported (start and finish)

masstransitOptions

Additional parameters for building routes.

routeListener

Listener to retrieve a list of MasstransitRoute objects.

requestRoutesSummary

public SummarySession requestRoutesSummary (@NonNull List< RequestPoint > points, @NonNull MasstransitOptions masstransitOptions, @NonNull SummaryListener summaryListener)

Submits a request to fetch a brief summary of a mass transit route.

resolveUri

public Session resolveUri (@NonNull String uri, @NonNull TimeOptions timeOptions, @NonNull RouteListener routeListener)

Submits a request to retrieve detailed information on a mass transit route by URI.

Parameters:
uri

The URI of the mass transit route. Starts with "ymapsbm1://route/transit".

timeOptions

Desired departure/arrival time settings. Empty TimeOptions for requests that are not time-dependent.

routeListener

Listener to retrieve a list of MasstransitRoute objects.

routeSerializer

public MasstransitRouteSerializer routeSerializer ()

Returns a route serializer instance.