Warning

This feature is available in the Full MapKit SDK version

MMKMasstransitRouter

@interface MMKMasstransitRouter : NSObject

Provides methods for submitting mass transit routing requests.

Summary

Instance methods

- (nonnull MMKMasstransitSession *)
    requestRoutesWithPoints:(nonnull NSArray<MMKRequestPoint *> *)points
             transitOptions:(nonnull MMKTransitOptions *)transitOptions
               routeOptions:(nonnull MMKRouteOptions *)routeOptions
               routeHandler:
                   (nonnull MMKMasstransitSessionRouteHandler)routeHandler;

Submits a request to find mass transit routes

- (nonnull MMKMasstransitSummarySession *)
    requestRoutesSummaryWithPoints:(nonnull NSArray<MMKRequestPoint *> *)points
                    transitOptions:(nonnull MMKTransitOptions *)transitOptions
                      routeOptions:(nonnull MMKRouteOptions *)routeOptions
                    summaryHandler:
                        (nonnull MMKMasstransitSummarySessionSummaryHandler)
                            summaryHandler;

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

- (nonnull MMKMasstransitSession *)
    resolveUriWithUri:(nonnull NSString *)uri
          timeOptions:(nonnull MMKTimeOptions *)timeOptions
         routeHandler:(nonnull MMKMasstransitSessionRouteHandler)routeHandler;

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

- (nonnull MMKMasstransitRouteSerializer *)routeSerializer;
Returns a route serializer instance

Instance methods

requestRoutesWithPoints:transitOptions:routeOptions:routeHandler:

- (nonnull MMKMasstransitSession *)
    requestRoutesWithPoints:(nonnull NSArray<MMKRequestPoint *> *)points
             transitOptions:(nonnull MMKTransitOptions *)transitOptions
               routeOptions:(nonnull MMKRouteOptions *)routeOptions
               routeHandler:
                   (nonnull MMKMasstransitSessionRouteHandler)routeHandler;

Submits a request to find mass transit routes.

Parameters

points

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

transitOptions

Additional parameters for building routes.

routeOptions

Options for route personalization.

routeListener

Listener to retrieve a list of MasstransitRoute objects.


requestRoutesSummaryWithPoints:transitOptions:routeOptions:summaryHandler:

- (nonnull MMKMasstransitSummarySession *)
    requestRoutesSummaryWithPoints:(nonnull NSArray<MMKRequestPoint *> *)points
                    transitOptions:(nonnull MMKTransitOptions *)transitOptions
                      routeOptions:(nonnull MMKRouteOptions *)routeOptions
                    summaryHandler:
                        (nonnull MMKMasstransitSummarySessionSummaryHandler)
                            summaryHandler;

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


resolveUriWithUri:timeOptions:routeHandler:

- (nonnull MMKMasstransitSession *)
    resolveUriWithUri:(nonnull NSString *)uri
          timeOptions:(nonnull MMKTimeOptions *)timeOptions
         routeHandler:(nonnull MMKMasstransitSessionRouteHandler)routeHandler;

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 MMKTimeOptions for requests that are not time-dependent.

routeListener

Listener to retrieve a list of MasstransitRoute objects.


routeSerializer

- (nonnull MMKMasstransitRouteSerializer *)routeSerializer;

Returns a route serializer instance.