Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jim_chan
Contributor III

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
MVP
MVP

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

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.

4 Replies
MVP
MVP

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

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
Contributor III

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

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

MVP
MVP

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

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
Contributor III

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

thanks mohan.

Community Browser