Automatic display route information

Goodmorning to all,

i need to show the distance from customer address to shop; the "problem" i have is the way this direction is showed.

I show the way from the start to end is placed in form create event and i inizialize the map with the shop address via TWebGMapsGeocoding and call TWebGMaps lunch.

After that i try to load the street information in order to show it, but nothing append, but if i call this procedure with a button click event all works fine.



In form create (or show or activate)



InitMap // (wher i set TWebGMapsGeocoding)

WebGMaps1.Lunch // show the map

ShowDestination     // Set the from/to address and try to show the entire route



This show only the show address, but in a Tbutton onclick event i have only ShowDestination, and the route is displayed. (the same append in your demo program)



Any suggestion to avoid button click after the map is showed and show the route automatically ?



Thank's for all



Daniele

Hi,


Can you please try using the OnDownloadFinish event to determine if the map has finished loading?
After the event was triggered you can safely display a route.

Good mornig Bart,

thank's for tip.



Regard



Daniele