Avoids

Hi,
Google supports follow avoids in the api:

tolls|highways|ferries

It is possible, FNC Maps support this avoids too? At the moment only tolls is possible...

Thanks for help.
Thomas

Hi,

Thank you for your suggestion!
We'll consider adding functionality to avoid highways and/or ferries in a future version of Google Directions in TMS FNC Maps

Hi,
thank you for the feedback.

I've another suggestion:
In old versions of WebGMaps the startaddress and endaddress value is saved as string, from json response. In the new FNC Maps only latitude and longitute are saved. I can change the TTMSFNCDirectionsLeg class, but it will be easier for future support, if TMS the value add to the class.
Google Values in JSON response:
"start_address"
"end_address"
It helps to minimize geocoding requests...
Thank you very much!
Thomas

That is a good suggestion as well!
We'll add the extra start/end address fields in a future version of TMS FNC Maps.

Hi Thomas,
I'm not sure if this will be implemented by tms, but it's quite easy to do it yourself

For Google and the VCL simply add the paramters "; AAvoidHighways: Boolean = False; AAvoidFerries: Boolean = False" behind "AAvoidTolls: Boolean = False"
to every appropriate routine. (.GetQuery and .GetPostData)
Behind AAvoidTolls add the two new parameters AAvoidHighways, AAvoidFerris to every call
In "VCL.TMSFNCDirections.Google.pas" at the end of "TTMSFNCDirectionsGoogleDirections.GetQuery" replace these two lines

if AAvoidTolls then
Result := Result + '&avoid=tolls';

with the following code:

with TStringList.Create do
try
Delimiter := '|';
StrictDelimiter := True;
if AAvoidTolls then
Add('tolls');
if AAvoidHighways then
Add('highways');
if AAvoidFerries then
Add('ferries');
if Count > 0 then
Result := Result + '&avoid='+DelimitedText;
finally
Free;
end;

it takes just 20 minutes!

As next, change "TTMSFNCDirections{ServiceName}Directions.GetQuery/.GetPostData" for the other desired services.

Hi Uwe, thank you very much for help...
I hope TMS build it into the code, it's better for future releases or updates.....
Best regards
Thomas