Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Longitude and Latitude

Hi ,

 

   

My question is from where to get the longitude and the latitude value , Or can i add just dummy Longitude and latitude value for the city ? Plz help me in understanding this concept .I have already put the map in dashboard . Pla help me out

.

Thanks

Kane

6 Replies
maxgro
MVP
MVP

un example here

Steps for beginners to implement Google Maps in Qlikview

and another in the attachment

Not applicable
Author

Hi Massimo thanks for the reply

could u plz lat me know  from where to get lattitude and longitude values , Since iam using trial version of qlikview , Iam not able to open ur attachment , could u plz send me in word document  format .

thanks

wrestler

MK_QSL
MVP
MVP

Use below in your script....

============================================

CustomerTable:

LOAD Quantity,

     Customer,

     City

FROM

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

============================================

Now follow steps as per the link provided by Massimo.

Customer table is also from the shown link.

There is a word file which explaining steps.

if you found difficulties, let us know...

MK_QSL
MVP
MVP

Use code in your QlikView script given in the enclosed file.

Now follow steps as per the link provided by Massimo.

Customer table is also from the shown link.

There is a word file which explaining steps.

if you found difficulties, let us know...

maxgro
MVP
MVP

this is the script in the qlik doc (perhaps you can find it in community as I download the Qlik doc from the community some months or years ago)

SET ThousandSep=' ';

SET DecimalSep=',';

SET MoneyThousandSep='.';

SET MoneyDecimalSep=',';

SET MoneyFormat='#.##0,00 kr;-#.##0,00 kr';

SET TimeFormat='hh:mm:ss';

SET DateFormat='YYYY-MM-DD';

SET TimestampFormat='YYYY-MM-DD hh:mm:ss[.fff]';

SET MonthNames='jan;feb;mar;apr;maj;jun;jul;aug;sep;okt;nov;dec';

SET DayNames='må;ti;on;to;fr;lö;sö';

//Provided by Alexander Karlsson - QlikTech Inc

//QlikTech takes no responsbility for any code.

//Use at your own risk.

//Do not submerge in water.

//Do not taunt Happy Fun Ball.

//Load the Swedish QlikTech Offices

AddressTable:

LOAD * INLINE [

    AddressField

    Englundavägen 7D Solna

    Scheelevägen 24-26 Lund

    Krokslätts Fabriker 45 Mölndal

    New York

];

//Loop over addresses

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

for i=0 to $(noRows)

  let addr = peek('AddressField',$(i),'AddressTable');

  //Javascript wrapper to urlEncode the addresses. See the macro module in QV for more info.

  let uri = urlEncode(addr);

  //Load responses from Google.

  GeocodeResponse:

        LOAD

        '$(addr)' as [AddressField],

        [result/geometry/location/lat] AS latitude,

        [result/geometry/location/lng] AS longitude

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

next i;

Not applicable
Author

i'll keep receiving this error...

Syntax error, FROM missing or misplaced:

Data:

  LOAD

  as FirstNameNew,

  as LastNameNew,

  as ProductSoldNew,

  as AddressNew,

  [result/geometry/location/lat] AS latitude,

        [result/geometry/location/lng] AS longitude

   

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

what I'm doing wrong???