Getting started with TMS FNC Toll Cost
Prerequisites
- TMS FNC Core installed and the runtime package added to the project.
- TMS FNC Maps installed and the runtime package added to the project.
- An API key for the toll cost service backend (e.g. TollGuru / PTV xServer).
Add the component
- Drop
TTMSFNCTollCost from the TMS FNC Maps palette page onto a form.
- Set the
APIKey property.
- Set the
Service property to choose the toll cost backend.
Request toll costs for a route
{ Inside a button click handler: }
var
Req: TTMSFNCTollCostRequest;
begin
Req := TMSFNCTollCost1.Requests.Add;
Req.Origin.Latitude := 40.7128;
Req.Origin.Longitude := -74.0060;
Req.Destination.Latitude := 42.3601;
Req.Destination.Longitude := -71.0589;
TMSFNCTollCost1.GetTollCost;
end;
Next steps
- Guides — vehicle options, emission type, and result handling.
- API reference — full class reference.