CartoType iOS API 7.8.2, 2022-03-25
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 *) - getGeometry
 
(double) - getDistance
 
(double) - getTollRoadDistance
 
(double) - getTime
 
(int) - getRouteSegmentCount
 
(CartoTypeRouteSegment *) - getRouteSegmentByIndex:
 
(void) - getNearestSegment:info:section:prevDistance:
 
(void) - getPointAtDistance:info:
 
(void) - getPointAtTime:info:
 
(int) - contourCount
 
(int) - pointCount:
 
(CartoTypePathPoint- point:pointIndex:
 
(void *) - getRoute
 
(int) - contourCount
 
(int) - pointCount:
 
(CartoTypePathPoint- point:pointIndex:
 

Detailed Description

A route.

Method Documentation

◆ contourCount

- (int) contourCount

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

Reimplemented from <CartoTypePath>.

◆ dealloc

- (void) dealloc

Destroys the object.

◆ getDistance

- (double) getDistance

Gets the distance of the route in meters.

◆ getGeometry

- (CartoTypeGeometry *) getGeometry

Gets the geometry of the route.

◆ getNearestSegment:info:section:prevDistance:

- (void) getNearestSegment: (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.

◆ getPointAtDistance:info:

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

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

◆ getPointAtTime:info:

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

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

◆ getRoute

- (void *) getRoute

Gets the internal C++ route object.

◆ getRouteSegmentByIndex:

- (CartoTypeRouteSegment *) getRouteSegmentByIndex: (int)  aIndex

Gets a route segment.

◆ getRouteSegmentCount

- (int) getRouteSegmentCount

Gets the number of route segments.

◆ getTime

- (double) getTime

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

◆ getTollRoadDistance

- (double) getTollRoadDistance

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

◆ initWithRouteObject:

- (id) initWithRouteObject: (void *)  aRouteObject

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

◆ point:pointIndex:

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

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

Reimplemented from <CartoTypePath>.

◆ pointCount:

- (int) pointCount: (int)  aContourIndex

Gets the number of points in a certain contour.

Reimplemented from <CartoTypePath>.


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