CartoType iOS API 8.8-13-g03c6f7017
for development in Swift and Objective C for iOS and Mac OS
Instance Methods | List of all members
CartoTypeRoute Class Reference

#import <CartoTypeRouter.h>

Inheritance diagram for CartoTypeRoute:
<CartoTypePath>

Instance Methods

(id) - initWithRouteObject:
 
(void) - dealloc
 
(CartoTypeGeometry *) - geometry
 
(double) - distance
 
(double) - tollRoadDistance
 
(double) - time
 
(int) - routeSegmentCount
 
(CartoTypeRouteSegment *) - routeSegmentByIndex:
 
(void) - nearestSegment:info:section:prevDistance:
 
(void) - pointAtDistance:info:
 
(void) - pointAtTime:info:
 
(int) - contourCount
 
(int) - pointCount:
 
(CartoTypePathPoint- point:pointIndex:
 
(void *) - route
 
(int) - contourCount
 
(int) - pointCount:
 
(CartoTypePathPoint- point:pointIndex:
 

Detailed Description

A route.

Method Documentation

◆ contourCount

- (int) contourCount

Returns the number of contours (sub-paths) in the path.

Reimplemented from <CartoTypePath>.

◆ dealloc

- (void) dealloc

Destroys the object.

◆ distance

- (double) distance

Returns the distance of the route in meters.

◆ geometry

- (CartoTypeGeometry *) geometry

Returns the geometry of the route.

◆ initWithRouteObject:

- (id) initWithRouteObject: (void *)  aRouteObject

Initializes a CartoTypeRoute with a C++ route object; for internal use only.

◆ nearestSegment:info:section:prevDistance:

- (void) nearestSegment: (CartoTypePoint aPoint
info: (CartoTypeNearestSegmentinfo *)  aInfo
section: (int)  aSection
prevDistance: (double)  aPreviousDistanceAlongRoute 

Gets information about the nearest route segment to a point given in map coordinates.

The parameter aSection gives the current route section (a part of the route between waypoints; simple routes have a single section). The returned segment will always be in the current section or a following section. It is theoretically possible for a section to be completely skipped if it is very short or of zero length, so there is no constraint that section 0 must be followed by section 1 and not by section 2, etc. If aSection is negative it is ignored and the returned segment may be in any section.

The parameter aPreviousDistanceAlongRoute should be provided (set to a value greater than zero) for multi-section routes, so that the correct route segment can be chosen if the route doubles back on itself. Positions further along the route will be given preference over those earlier in the route.

◆ point:pointIndex:

- (CartoTypePathPoint) point: (int)  aContourIndex
pointIndex: (int)  aPointIndex 

Returns a point, given its contour index and point index.

Reimplemented from <CartoTypePath>.

◆ pointAtDistance:info:

- (void) pointAtDistance: (double)  aDistanceInMeters
info: (CartoTypeNearestSegmentinfo *)  aInfo 

Gets information about a point a certain distance along a route.

◆ pointAtTime:info:

- (void) pointAtTime: (double)  aTimeInSeconds
info: (CartoTypeNearestSegmentinfo *)  aInfo 

Gets information about a point a certain estimated time along a route.

◆ pointCount:

- (int) pointCount: (int)  aContourIndex

Returns the number of points in a certain contour.

Reimplemented from <CartoTypePath>.

◆ route

- (void *) route

Returns the internal C++ route object.

◆ routeSegmentByIndex:

- (CartoTypeRouteSegment *) routeSegmentByIndex: (int)  aIndex

Returns a route segment by its index.

◆ routeSegmentCount

- (int) routeSegmentCount

Returns the number of route segments.

◆ time

- (double) time

Returns the estimated time taken to traverse the route in seconds.

◆ tollRoadDistance

- (double) tollRoadDistance

Returns the total distance of any parts of the route on toll roads, in meters.


The documentation for this class was generated from the following file: