CartoType Android API 7.8.2, 2022-03-25
for Java development on Android
|
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 () |
Information about an entire route.
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.
native int com.cartotype.Route.getContourCount | ( | ) |
Gets the number of contours (sub-paths).
Implements com.cartotype.Path.
native double com.cartotype.Route.getDistance | ( | ) |
Gets the distance of the route in metres.
Geometry com.cartotype.Route.getGeometry | ( | ) |
Gets the geometry of the route.
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.
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.
NearestSegmentInfo com.cartotype.Route.getPointAtDistance | ( | double | aDistanceInMeters | ) |
Gets information about a point a certain distance along a route.
NearestSegmentInfo com.cartotype.Route.getPointAtTime | ( | double | aTimeInSeconds | ) |
Gets information about a point a certain estimated time along a route.
native int com.cartotype.Route.getPointCount | ( | int | aContourIndex | ) |
Gets the number of points in a contour.
Implements com.cartotype.Path.
RouteProfile com.cartotype.Route.getProfile | ( | ) |
Gets the route profile used to create this route.
RouteSegment com.cartotype.Route.getRouteSegment | ( | int | aIndex | ) |
Gets a route segment.
native int com.cartotype.Route.getRouteSegmentCount | ( | ) |
Gets the number of route segments.
native double com.cartotype.Route.getTime | ( | ) |
Gets the estimated time taken to traverse the route in seconds.
native double com.cartotype.Route.getTollRoadDistance | ( | ) |
Gets the total distance in metres of the parts of the route that are on toll roads.
boolean com.cartotype.Route.isClosed | ( | ) |
Returns true if the path is closed.
Implements com.cartotype.Path.