Google Maps in a TWebBrowser from Delphi: Directions
The GoogleMaps API has a GDirections object which can be used to retrieve directions between points. Full JavaScript applications are possible, but interaction with Delphi allows further possibilities. Previous demo programs showed how to call JavaScript from Delphi, this demo also allows the JavaScript to call Delphi functions (using JavaScript’s external object, explained later).
The demo program allows you to enter two or three addresses, and will retrieve the directions with the GoogleMaps API. The directions will be sent to Delphi from JavaScript, and they will be displayed in a TListBox. Clicking on an item in the TListBox will show the map “blowup” (a zoomed in box for a step, as seen in the screenshot above).
