Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Retrieve Latitude and Longitude on Qlik Sense

Hi  , I have a script (below)  for Qlik View to  retrieve Longitude and Latitude  using Goggle Maps API (without using QV connector)

Anyone can help me to do the same thing on Qlik Sense ( i have already configured REST Connector on Sense ) but I don 't

know how to use it on Load statement

Thanks

Script for Qlik View:

Locali:

LOAD LOCALE,

     INDIRIZZO,

     CITY,

     CAP,

     PROVINCIA,

     WEB,

     MAIL,

     FB,

     OTHERS,

     NOTES

FROM

(ooxml, embedded labels, table is Foglio1);

let noRows = NoOfRows('Locali')-1;

for i=0 to $(noRows)

  let a = peek('LOCALE',$(i),'Locali');

    let b = peek('CITY',$(i),'Locali');

    let c = peek('CAP',$(i),'Locali');

      

GeocodeResponse:

  LOAD

  status,

  '$(a)' as LOCALE,

  '$(b)' as CITY,

  '$(c)' as CAP,

  ([result/geometry/location/lat]) as latitude,

    ([result/geometry/location/lng]) as longitude

  FROM [http://maps.googleapis.com/maps/api/geocode/xml?address=$(b)&sensor=false] (XmlSimple, Table is [GeocodeResponse]);

next i;

1 Reply
Michael_Tarallo
Employee
Employee

Hi Davide,

Check out this video on REST and see if it helps you:

Working with the Qlik REST Connector, Pagination and Multiple JSON Schemas

Note: - I assume you are not using GeoAnalytics? - If not - I will  move this post to the general Qlik Sense section. GeoAnalytics can on-the-fly geo-code place names, postal codes etc. so under some circumstances there is no need to explicitly retrieve lats and longs.

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

Regards,

Michael Tarallo (@mtarallo) | Twitter

Qlik

Regards,
Mike Tarallo
Qlik