MapLink Pro 11.2
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLRouteQuery Class Reference

Detailed Description

The TSLRouteQuery object returned by the TSLTiledNetwork::route method will provide information about a query made on the tiled network. All objects contained within the TSLRouteQuery are copies of the original network data and will remain valid until the TSLRouteQuery object is destroyed.

The order of the nodes and links contained in the TSLRouteQuery object follow the order of the nodes and links calculated for the route. i.e. get_node(0) returns the start node, get_link(0) returns the first link in the route and so on.

Public Member Functions

void destroy ()
 
double get_cost (long index)
 
const TSLLinkReferenceget_link (long index)
 
const TSLNodeReferenceget_node (long index)
 
long node_count ()
 
long link_count ()
 
TSLPolylinegeneratePolyline (long from_index=0, long to_index=-1)
 

Member Function Documentation

◆ destroy()

void TSLRouteQuery::destroy ( )

Destructor for the object

◆ generatePolyline()

TSLPolyline * TSLRouteQuery::generatePolyline ( long from_index = 0,
long to_index = -1 )

Generates a TSLPolyline composed from the links between the node identified by the from index and the node identified from by the to index. The user is responsible for managing any TSLPolylines created.

Parameters
from_indexindex of the node to start generating from
to_indexindex of the node to end generation
Returns
Pointer to a TSLPolyline object if generation was successful , 0 otherwise.

◆ get_cost()

double TSLRouteQuery::get_cost ( long index)

Gets the cost for a link at the given index

◆ get_link()

const TSLLinkReference * TSLRouteQuery::get_link ( long index)

Returns a pointer to the TSLLinkReference for the link at the specified index.

Parameters
indexindex to the found links
Returns
A reference to the TSLLinkReference if the index is valid. Otherwise returns 0

◆ get_node()

const TSLNodeReference * TSLRouteQuery::get_node ( long index)

Returns a pointer a TSLNodeReference for the node at the specified index.

Parameters
indexindex to the found nodes
Returns
A pointer to the TSLNodeReference if the index is valid. Otherwise returns 0

◆ link_count()

long TSLRouteQuery::link_count ( )
Returns
the number of links in the query.

◆ node_count()

long TSLRouteQuery::node_count ( )
Returns
the number of nodes in the query.