NearestOpen |
Top Previous Next |
Function NearestOpen(const node: integer; var NearestNode,NearestLink: integer; var cost: single): integer;
This function takes as input a node and will return the nearest open link, that is one which is not closed for driving in both directions. The nearest node, where it is possible to start a route, is also returned and the cost of getting there.
This can be used when starting a route in a pedestrian-only area, where several links are closed for driving, but has addresses attached.
The function also work in turn-restriction mode. Then both one-way restrictions and any turn-restrictions will be ignored in the search for the nearest open link.
Returns 0 if no errors.
Possible error codes: -10 -30 -45 Versions: Standard Pro ActiveX / VCL / CLX component: RWcalc
|