/*
Custom Function to integrate Longitude and Latitude of given addresses. I tested it with
USA and Germany.
Countries supported (as of May 2007):
Austria
Australia
Belgium
Brazil
Canada
The Czech Republic
Denmark
Finland
France
Germany
Hungary
Italy
Japan
Luxembourg
New Zealand
Norway
The Netherlands
Poland
Portugal
Russia (24 cities)
Spain
Sweden
Switzerland
United States.
[http://code.google.com/support/bin/answer.py?answer=62668&topic=10946]
Overview of Google services in different countries:
http://gmaps-samples.googlecode.com/svn/trunk/mapcoverage_filtered.html
*/
/*
SYNTAX:
_GEO_Google_Geocode_URL ( Street ; ZIP ; town ; country ; API_KEY )
AUTHOR:
Ralph Nusser, 14-JUN-2006
EXAMPLE INPUT:
Address of FileMaker, Inc.
http://maps.google.com/maps/geo?q=5201+Patrick+Henry+Drive,Santa+Clara,CA&output=xml&key==YOUR_PERSONAL_API_KEY
EXAMPLE GOOGLE REXPONSE:
<?xml version="1.0" encoding="UTF-8" ?>
- <kml xmlns="http://earth.google.com/kml/2.0">
- <Response>
<name>5201 Patrick Henry Drive,Santa Clara,CA</name>
- <Status>
<code>200</code>
<request>geocode</request>
</Status>
- <Placemark>
<address>5201 Patrick Henry Dr, Santa Clara, CA 95054, USA</address>
- <AddressDetails xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
- <Country>
<CountryNameCode>US</CountryNameCode>
- <AdministrativeArea>
<AdministrativeAreaName>CA</AdministrativeAreaName>
- <SubAdministrativeArea>
<SubAdministrativeAreaName>Santa Clara</SubAdministrativeAreaName>
- <Locality>
<LocalityName>Santa Clara</LocalityName>
- <Thoroughfare>
<ThoroughfareName>5201 Patrick Henry Dr</ThoroughfareName>
</Thoroughfare>
- <PostalCode>
<PostalCodeNumber>95054</PostalCodeNumber>
</PostalCode>
</Locality>
</SubAdministrativeArea>
</AdministrativeArea>
</Country>
</AddressDetails>
- <Point>
<coordinates>-121.984498,37.406485,0</coordinates>
</Point>
</Placemark>
</Response>
</kml>
NOTE:
Your personal key you get here:
http://www.google.com/apis/maps/signup.html
If you have a dynamic IP: e.g.: "http://217.162.191.211"
http://wwwfindnot.com tells you your dynamic IP.
15'000 retrievals per day are permitted.
Other geocoding services:
http://groups.google.com/group/Google-Maps-API/web/resources-non-google-geocoders
For Germany the German Umlaut and the other special caracters have to be substituted.
*/
Let (
[
a = "http://maps.google.com/maps/geo?q=" ;
b= "&output=xml&key=";
street = Substitute ( Street ;[ " "; "+"];
[ "a Umlaut"; "ae"];
[ "o Umlaut"; "oe"];
[ "u Umlaut"; "ue"];
[ "β"; "ss"]);
zip = ZIP & "+" & Substitute ( town; [" "; "+"];
[ "a Umlaut"; "ae"];
[ "o Umlaut"; "oe"];
[ "u Umlaut"; "ue"];
[ "ß"; "ss"]
);
country = Country;
// Everyone needs his PERSONAL_GOOGLE_API_KEY
key = API_KEY
]
;
a & street & "," & zip & "+" & country & b & key
)
Note: these examples are not guaranteed or supported
by BrianDunning.com. Please contact the individual developer with any questions
or problems.
Add progress bars to those slow scripts in your FileMaker Pro solution. Click
here.
Web Viewer Example Authors:
Link to all of your own Web Viewer Examples on this site with the following URL:
http://www.briandunning.com/filemaker-web-viewer/results.php?author=Your
Name Here