Topic: Google qnd :VD
Hello Matmathou and Dmitry
Mathmatou :
I tested your script to use an application with Google Maps (I made a Contact Manager application).
When I click on a button, I can see the town of my contact displayed into Google).
It works fine.
The code was :
OpenURL('https://www.google.com/maps/place/' + Accueil.Label24.Caption+',+fr+'+Accueil.Label13.Caption);
Label 24 is the town, Label13 is Postal Code.
I tried to go beyond asking Google to display the map with the street directly in my contact.
After some quests into the web, I wrote surch a procedure to do that.
This is the code :
procedure Google_Search(const Adresse : string; const CP : string; const Ville : string);
var URL : string;
begin
URL := 'http://maps.google.fr/maps?f=q&hl=fr&q=';
URL := URL + Accueil.Label19.Caption + ' ,+ ' + Accueil.Label13.Caption + '+' + Accueil.Label24.Caption;
ShellExecute(GetDesktopWindow(), 'open', PChar(URL), nil, nil, SW_SHOWNORMAL);
end;
Here, Label19 is th street where lives my contacts.
When I launch MVD, I get an error message telling : 'Undeclared identifier : ShellExecute'.
As ShellExecute belongs to ShellAPI unit of Windows, I wonder this one is implemented in MVD.
Dmitry, thanks for your answers
JB