# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

## 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:

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:

status,

'\$(a)' as CustomerName,

'\$(b)' as CustomerCity,

'\$(c)' as CustomerQuantity,

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

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

next i;

Regards,

Jagan.

4 Replies
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
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

## 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:

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:

status,

'\$(a)' as CustomerName,

'\$(b)' as CustomerCity,

'\$(c)' as CustomerQuantity,

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

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

next i;