1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Personnes:
LOAD * INLINE
[
ID, VILLE
1, 21000 DIJON
2, 69000 LYON
3, 21000 DIJON
4, 75000 PARIS
5, 61000 ALENCON
6, 63000 CLERMONT FERRAND
7, 75000 PARIS
8,
9,
10, 61000 ALENCON
];
let noRows = NoOfRows('Personnes')-1;
FOR i=0 TO $(noRows)
let address=peek('VILLE',$(i),'Personnes');
if len('$(address)') > 0 and isnull(Lookup('VILLE', 'VILLE', '$(address)', 'LocationData')) then
LocationData:
LOAD
'$(address)' AS VILLE,
[result/geometry/location/lng] AS longitude,
[result/geometry/location/lat] AS latitude
FROM [http://maps.googleapis.com/maps/api/geocode/xml?address=$(address)&output=xml&oe=utf8&sensor=false] (XmlSimple, TABLE IS [GeocodeResponse])
;
end if
next |
Partager