NearestLocation

Top  Previous  Next

Function NearestLocation(link: integer; percent: double; locationnum: integer): integer

 

Finds the nearest location from a list of locations, calculated from a starting location.

 

Enter a list of possible nearest locations through the standard location list functions and call the function with these parameters:

 

Link is the starting link.

Percent is the position along the starting link.

Locationnum is the number of locations on the location list.

 

Returns the ID of the nearest location on location list, that is a number between 1 and locationnum. The real location can then be found with LocationListGet. If return value=0, none of the locations where found.

 

You can improve performance of this function by not having any very long links in your network, such as a long ferry route.

 

Possible error codes: -10 -30 -40 -43

Versions: Standard Pro

ActiveX / VCL / CLX component: RWcalc