Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

getting Long. & Lat. coordinates

i am looking for a way to automatically get the actual coordinates based on the State and City, (and Zip code) of a given records.

if anybody had done something like that, if you can point me in the right direction.

does Google provide a service like that ?

3 Replies
sczetty
Partner - Contributor
Partner - Contributor

As long as you have a zip-code, you can purchase an inexpensive zip-codes database from zipocodes.com. Their data is geocoded with the longitude and latitude values for all zip-codes. I have used this data with great success in google maps integration. The cost is around $100 for a one year subscription, and you get monthly updates.

There may be free geocoded lists to zip-codes out there, but I have never succeeded infinding a complete one yet. Sometimes you have to pay for what you get.

Good luck!

Steve

dirk_konings
Creator III
Creator III

Some sample code for using Maps.google :

tmpAddress:

LOAD Klant, trim(KlantStraat) & ' '& trim(KlantHuisnr) & ', ' & trim(KlantPostnr) & ' ' & trim(KlantWoonplaats) as vAddress

resident Customers;

left join (Customers)

load * resident tmpAddress ;

Drop table tmpAddress ;

LET NumberOfAddresses = FieldValueCount('vAddress');

FOR i = 0 to $(NumberOfAddresses)-1

LET C = peek('vAddress', '$(i)', 'Customers');

if '$(C)' <> ', ' then

T:

LOAD

'$(C)' as Address1,

subfield([Response/Placemark/Point/coordinates], ',' ,1) AS Latitude,

subfield([Response/Placemark/Point/coordinates], ',' ,2) AS Longitude

FROM [http://maps.google.com/maps/geo?q=$(C)&output=xml&oe=utf8&sensor=false&key=QQQQQ] (XmlSimple, Table is [kml]);

end if

NEXT

Note : not always a correct response due to quick responses of website. Build a loop untill you have all values for each customer



Not applicable
Author

Hi! All,

I want latitudes and longitudes for a country to integrate google maps in my QV application. So does anyone has an idea about any site or any other source which can provide latitudes and longitudes for any desired country or location.Any help will be very much apprecaited.

Thanks in advance.

Rahul.