CartoType Android API 8.8-7-gb35e4dc71
for Java development on Android
|
Public Member Functions | |
Route | copyWithoutRestrictedSegments () |
Geometry | geometry () |
RouteProfile | profile () |
native double | distance () |
native double | time () |
native int | routeSegmentCount () |
RouteSegment | routeSegment (int aIndex) |
native double | tollRoadDistance () |
NearestSegmentInfo | getNearestSegment (double aX, double aY, NearestSegmentInfo aInfo, int aSection, double aPreviousDistanceAlongRoute) |
NearestSegmentInfo | pointAtDistance (double aDistanceInMeters) |
NearestSegmentInfo | pointAtTime (double aTimeInSeconds) |
native int | contourCount () |
native int | pointCount (int aContourIndex) |
native PathPoint | point (int aContourIndex, int aPointIndex) |
boolean | isClosed () |
int | contourCount () |
int | pointCount (int aContourIndex) |
PathPoint | point (int aContourIndex, int aPointIndex) |
boolean | isClosed () |
Information about an entire route.
native int com.cartotype.Route.contourCount | ( | ) |
Gets the number of contours (sub-paths).
Implements com.cartotype.Path.
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 double com.cartotype.Route.distance | ( | ) |
Returns the distance of the route in metres.
Geometry com.cartotype.Route.geometry | ( | ) |
Returns 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.
boolean com.cartotype.Route.isClosed | ( | ) |
Returns true if the path is closed.
Implements com.cartotype.Path.
native PathPoint com.cartotype.Route.point | ( | int | aContourIndex, |
int | aPointIndex | ||
) |
Gets a point given its contour and point indexes.
Implements com.cartotype.Path.
NearestSegmentInfo com.cartotype.Route.pointAtDistance | ( | double | aDistanceInMeters | ) |
Gets information about a point a certain distance along a route.
NearestSegmentInfo com.cartotype.Route.pointAtTime | ( | double | aTimeInSeconds | ) |
Gets information about a point a certain estimated time along a route.
native int com.cartotype.Route.pointCount | ( | int | aContourIndex | ) |
Gets the number of points in a contour.
Implements com.cartotype.Path.
RouteProfile com.cartotype.Route.profile | ( | ) |
Returns the route profile used to create this route.
RouteSegment com.cartotype.Route.routeSegment | ( | int | aIndex | ) |
Returns a route segment.
native int com.cartotype.Route.routeSegmentCount | ( | ) |
Returns the number of route segments.
native double com.cartotype.Route.time | ( | ) |
Returns the estimated time taken to traverse the route in seconds.
native double com.cartotype.Route.tollRoadDistance | ( | ) |
Returns the total distance in metres of the parts of the route that are on toll roads.