CartoType iOS API 7.8.2, 2022-03-25
for development in Swift and Objective C for iOS and Mac OS
|
#import <CartoTypeRouter.h>
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: |
A route.
- (int) contourCount |
Gets the number of contours (sub-paths) in the path.
Reimplemented from <CartoTypePath>.
- (void) dealloc |
Destroys the object.
- (double) getDistance |
Gets the distance of the route in meters.
- (CartoTypeGeometry *) getGeometry |
Gets the geometry of the route.
- (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.
- (void) getPointAtDistance: | (double) | aDistanceInMeters | |
info: | (CartoTypeNearestSegmentinfo *) | aInfo | |
Gets information about a point a certain distance along a route.
- (void) getPointAtTime: | (double) | aTimeInSeconds | |
info: | (CartoTypeNearestSegmentinfo *) | aInfo | |
Gets information about a point a certain estimated time along a route.
- (void *) getRoute |
Gets the internal C++ route object.
- (CartoTypeRouteSegment *) getRouteSegmentByIndex: | (int) | aIndex |
Gets a route segment.
- (int) getRouteSegmentCount |
Gets the number of route segments.
- (double) getTime |
Gets the estimated time taken to traverse the route in seconds.
- (double) getTollRoadDistance |
Gets the total distance of any parts of the route on toll roads, in meters.
- (id) initWithRouteObject: | (void *) | aRouteObject |
Initializes a CartoTypeRoute with a C++ route object; for internal use only.
- (CartoTypePathPoint) point: | (int) | aContourIndex | |
pointIndex: | (int) | aPointIndex | |
Gets a point, given its contour index and point index.
Reimplemented from <CartoTypePath>.
- (int) pointCount: | (int) | aContourIndex |
Gets the number of points in a certain contour.
Reimplemented from <CartoTypePath>.