Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

what is the simplest way to create a functional map in Sense?

Hi all,

what is the simplest way to create a functional map in Sense?

I have loaded a country table with column - country_name, city. I have loaded the data, so i dragged a map object. but i couldnt add in dimension.

Rgds


Jim

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

You can get the Latitudes and Longitudes by using sample script like below, in this we are getting the coordinates by sending city to Google.

CustomerTable:

LOAD Quantity,

     Customer,

     City

FROM

C:\Customer_info.xls

(biff, embedded labels, table is [Sheet1$]);

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

for i=0 to $(noRows)

  let a = peek('Customer',$(i),'CustomerTable');

    let b = peek('City',$(i),'CustomerTable');

    let c = peek('Quantity',$(i),'CustomerTable');

      

  GeocodeResponse:

  LOAD

  status,

  '$(a)' as CustomerName,

  '$(b)' as CustomerCity,

  '$(c)' as CustomerQuantity,

  ([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;

Please check below link for various map related help.

Google MAPs related APPs

Regards,

Jagan.

View solution in original post

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

You will need geographic coordinates (latitude and longitude) for your data points. Do you have these?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jim_chan
Specialist
Specialist
Author

nope I dont have geographic coordinates (lat and long). where can i get that?

jagan
Partner - Champion III
Partner - Champion III

Hi,

You can get the Latitudes and Longitudes by using sample script like below, in this we are getting the coordinates by sending city to Google.

CustomerTable:

LOAD Quantity,

     Customer,

     City

FROM

C:\Customer_info.xls

(biff, embedded labels, table is [Sheet1$]);

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

for i=0 to $(noRows)

  let a = peek('Customer',$(i),'CustomerTable');

    let b = peek('City',$(i),'CustomerTable');

    let c = peek('Quantity',$(i),'CustomerTable');

      

  GeocodeResponse:

  LOAD

  status,

  '$(a)' as CustomerName,

  '$(b)' as CustomerCity,

  '$(c)' as CustomerQuantity,

  ([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;

Please check below link for various map related help.

Google MAPs related APPs

Regards,

Jagan.

jim_chan
Specialist
Specialist
Author

thanks mohan.