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