Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have an issue when getting the latitude and longitude for a city. The problem is as follows: roci
Lets say I have 10 cities. I run the script below. The first time I get a result for 8 cities, the next time for 7, then for 5 or 8, but never the full 10. The result is totally random. So, the first time city A can be found, the next time the result is empty. What am I doing wrong?
Script:
Location:
LOAD
City
, Country
FROM [Dimensions QVD\LocationTmp.qvd] (qvd)
;Let noRows = NoOfRows('Location')-1;
for i=0 to $(noRows)
let b = peek('City',$(i),'Location');
let c = peek('Country',$(i),'Location');
GeocodeResponse:
LOAD
'$(b)' as LocationKey,
([result/geometry/location/lat]) as Latitude,
([result/geometry/location/lng]) as Longitude
FROM [http://maps.googleapis.com/maps/api/geocode/xml?address=$(b)+$(c)&sensor=false] (XmlSimple, Table is [GeocodeResponse]);
sleep 500;
next i;
I guess its because you dont have an API Key.
You can register here:
hope this helps