04: YahooMaps
This programs uses Yahoo Map API at developer.yahoo.com/maps/ to get an actual map and show it in an Image control. The map is retrieved in two steps: a first HTTP call passes the address and receives the URL of the map image, which is retrieved using a second HTTP call. The data is the same from Customer.cds of the previous example, GeoLocation (included again). The images is saved to a temp file, and loaded into the control. There is a button to get the map of a hardcoded location (San Jose, as this was the Delphi Live demo).
The program requires an AppID you can obtain at the URL above, and stores in another ini file in the "user documents" folder called YahooMaps.ini, as follows:
[yahoo] appid=
Download: 04_YahooMaps.zip (700 KB).
05: MappingDemo and 06: DbToSheet still missing
07: Translate
This program uses Google Translate REST API to translate some text to almost any language. The documentation is at: code.google.com/apis/ajaxlanguage/documentation/.
The demo uses a specific component, invoked with a class method (the component is not placed on any form in this demo, but could). The nice thing is the support component makes the API very easy to use, and incapsulates the HTTP call completely. There is no need for a signup key (and an ini file). One should provide a referrer site, but everything seems to work even without that information. The main form has a listbox filled with all supported languages. The demo translated from English, but you can set it up on the opposite direction as well. In theory, any two language token combination works, in practice not always.
Download: 07_Translate.zip (388 KB).