CartoType Android API 7.8.2, 2022-03-25
for Java development on Android
Public Member Functions | List of all members
com.cartotype.Route Class Reference
Inheritance diagram for com.cartotype.Route:
com.cartotype.Path

Public Member Functions

Route copyWithoutRestrictedSegments ()
 
Geometry getGeometry ()
 
RouteProfile getProfile ()
 
native double getDistance ()
 
native double getTime ()
 
native int getRouteSegmentCount ()
 
RouteSegment getRouteSegment (int aIndex)
 
native double getTollRoadDistance ()
 
NearestSegmentInfo getNearestSegment (double aX, double aY, NearestSegmentInfo aInfo, int aSection, double aPreviousDistanceAlongRoute)
 
NearestSegmentInfo getPointAtDistance (double aDistanceInMeters)
 
NearestSegmentInfo getPointAtTime (double aTimeInSeconds)
 
native int getContourCount ()
 
native int getPointCount (int aContourIndex)
 
native void getPoint (int aContourIndex, int aPointIndex, PathPoint aPoint)
 
boolean isClosed ()
 
int getContourCount ()
 
int getPointCount (int aContourIndex)
 
void getPoint (int aContourIndex, int aPointIndex, PathPoint aPoint)
 
boolean isClosed ()
 

Detailed Description

Information about an entire route.

Member Function Documentation

◆ copyWithoutRestrictedSegments()

Route com.cartotype.Route.copyWithoutRestrictedSegments ( )

Creates a copy of the route, but without any restricted segments at the start or end, such as private access roads.

◆ getContourCount()

native int com.cartotype.Route.getContourCount ( )

Gets the number of contours (sub-paths).

Implements com.cartotype.Path.

◆ getDistance()

native double com.cartotype.Route.getDistance ( )

Gets the distance of the route in metres.

◆ getGeometry()

Geometry com.cartotype.Route.getGeometry ( )

Gets the geometry of the route.

◆ getNearestSegment()

NearestSegmentInfo com.cartotype.Route.getNearestSegment ( double  aX,
double  aY,
NearestSegmentInfo  aInfo,
int  aSection,
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.

◆ getPoint()

native void com.cartotype.Route.getPoint ( int  aContourIndex,
int  aPointIndex,
PathPoint  aPoint 
)

Gets a point given its contour and point indexes.

Implements com.cartotype.Path.

◆ getPointAtDistance()

NearestSegmentInfo com.cartotype.Route.getPointAtDistance ( double  aDistanceInMeters)

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

◆ getPointAtTime()

NearestSegmentInfo com.cartotype.Route.getPointAtTime ( double  aTimeInSeconds)

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

◆ getPointCount()

native int com.cartotype.Route.getPointCount ( int  aContourIndex)

Gets the number of points in a contour.

Implements com.cartotype.Path.

◆ getProfile()

RouteProfile com.cartotype.Route.getProfile ( )

Gets the route profile used to create this route.

◆ getRouteSegment()

RouteSegment com.cartotype.Route.getRouteSegment ( int  aIndex)

Gets a route segment.

◆ getRouteSegmentCount()

native int com.cartotype.Route.getRouteSegmentCount ( )

Gets the number of route segments.

◆ getTime()

native double com.cartotype.Route.getTime ( )

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

◆ getTollRoadDistance()

native double com.cartotype.Route.getTollRoadDistance ( )

Gets the total distance in metres of the parts of the route that are on toll roads.

◆ isClosed()

boolean com.cartotype.Route.isClosed ( )

Returns true if the path is closed.

Implements com.cartotype.Path.


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