Warning

This feature is available in the Full MapKit SDK version

MMKMasstransitSection

@interface MMKMasstransitSection : NSObject

Contains information about an individual section of a mass transit MMKMasstransitRoute. The only fields that are always set are MMKMasstransitSection::metadata.MMKMasstransitSectionMetadata::weight, MMKMasstransitSection::geometry and MMKMasstransitSection::metadata.MMKMasstransitSectionMetadata::data.

Summary

Class methods

+ (nonnull MMKMasstransitSection *)sectionWithMetadata:(nonnull MMKMasstransitSectionMetadata *)metadata
                                              geometry:(nonnull MMKSubpolyline *)geometry
                                                 stops:(nonnull NSArray<MMKMasstransitRouteStop *> *)stops
                                              rideLegs:(nonnull NSArray<MMKSubpolyline *> *)rideLegs;

Properties

@property (nonatomic, readonly, nonnull) MMKMasstransitSectionMetadata *metadata;
General information about a section of a route

@property (nonatomic, readonly, nonnull) MMKSubpolyline *geometry;
Geometry of the section as a fragment of a MMKMasstransitRoute polyline

@property (nonatomic, readonly, nonnull)
    NSArray<MMKMasstransitRouteStop *> *stops;

Vector of stops along the route

@property (nonatomic, readonly, nonnull) NSArray<MMKSubpolyline *> *rideLegs;
Vector of polylines each connecting two consecutive stops

Class methods

sectionWithMetadata:geometry:stops:rideLegs:

+ (nonnull MMKMasstransitSection *)sectionWithMetadata:(nonnull MMKMasstransitSectionMetadata *)metadata
                                              geometry:(nonnull MMKSubpolyline *)geometry
                                                 stops:(nonnull NSArray<MMKMasstransitRouteStop *> *)stops
                                              rideLegs:(nonnull NSArray<MMKSubpolyline *> *)rideLegs;


Properties

metadata

@property (nonatomic, readonly, nonnull) MMKMasstransitSectionMetadata *metadata;

General information about a section of a route.


geometry

@property (nonatomic, readonly, nonnull) MMKSubpolyline *geometry;

Geometry of the section as a fragment of a MMKMasstransitRoute polyline.


stops

@property (nonatomic, readonly, nonnull)
    NSArray<MMKMasstransitRouteStop *> *stops;

Vector of stops along the route. The first stop in the vector is the stop for boarding the transport, and the last stop in the vector is the stop for exiting the transport.


rideLegs

@property (nonatomic, readonly, nonnull) NSArray<MMKSubpolyline *> *rideLegs;

Vector of polylines each connecting two consecutive stops. This vector is only filled for mass transit ride sections, so this geometry represents a part of the mass transit thread geometry between two stops.