Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
Regards,
Jagan.
You will need geographic coordinates (latitude and longitude) for your data points. Do you have these?
nope I dont have geographic coordinates (lat and long). where can i get that?
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.
Regards,
Jagan.
thanks mohan.