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: 
Qlik_Enthu
Creator II
Creator II

issue in getting plots on a google map in qlikview

Dear All,

I followed steps from the document "Steps to implement Google map in Qlikview" and BillionRows.com tutorial, to create a map.

I got the below result:

My issues with this scatter chart are as follows:

1. I deal with only EU countries, hence I do not want the other continents to be visible in the map.

2. The plots are visible in the bottom left corner of the map object and unable to plot accurately over the Europe on the map.

Location Data:

I used the coordinates from the file:

https://developers.google.com/public-data/docs/canonical/countries_csv]

I used map image from the link: ='http://maps.googleapis.com/maps/api/staticmap?center=' &  num(var_mid_lat, '##############', '.', ',' ) & ',' &  num(var_mid_long, '##############', '.', ',' ) & '&zoom=$(var_zoom)' & '&maptype='&var_maptype  & '&size='&map_size_x&'x'&map_size_y  & '&sensor=false' & '&scale=&map_scale


My Expressions are as follows:

Longitude: =sum( round (256*pow(2,($(var_zoom)-1)))+( longitude  *((256*pow(2,$(var_zoom)))/360)) )

Latitude: =sum
((256*
pow(2,($(var_zoom)-1)))+((0.5*log((1+(sin((latitude)*pi()/180)))/(1-(sin((latitude)*pi()/180)))))*((-256*pow(2,$(var_zoom)))/(2*pi()))))
)

Total Orders created :Count(EU.CUSORD_NO)+Count(EUX.CUSORD_NO)


Axes:

X-axis- Static Min & Static Max:

(256*pow(2,($(var_zoom)-1)))+( var_mid_long  *((256*pow(2,$(var_zoom)))/360)) -round(map_size_x/2) 

((256*pow(2,($(var_zoom)-1)))+( var_mid_long  *((256*pow(2,$(var_zoom)))/360)) + round(map_size_x/2))


Y-axis- Static Min & Static Max:

=((256*pow(2,($(var_zoom)-1)))+((0.5*log((1+(sin(var_mid_lat*pi()/180)))/(1-(sin(var_mid_lat*pi()/180)))))*((-256*pow(2,$(var_zoom)))/(2*pi())))+round(map_size_y/2))

=((256*pow(2,($(var_zoom)-1)))+((0.5*log((1+(sin(var_mid_lat*pi()/180)))/(1-(sin(var_mid_lat*pi()/180)))))*((-256*pow(2,$(var_zoom)))/(2*pi())))-round(map_size_y/2))

How to correct this as per my requirement. Can someone help?

Thank you!

Sai

20 Replies
Qlik_Enthu
Creator II
Creator II
Author

This is my data model. However will validate lats and longs

Frank_Hartmann
Master II
Master II

can u share your qvw? Maybe with scrambled data?

Qlik_Enthu
Creator II
Creator II
Author

Hi Frank attached my QVW hre.

Frank_Hartmann
Master II
Master II

I found your mistake.

You will have to be careful with the capital letters regarding the fieldnames.


longitude <> Longitude

and

latitude <> Latitude

Qlikview is casesensitive.

I changed it (in the expressions and the in variables) and now it seems to work

Qlik_Enthu
Creator II
Creator II
Author

Hi Frank,

Unable to open and started getting this error:

Anil_Babu_Samineni

I assume, Frank just changing the Names only.

longitude <> Longitude

and

latitude <> Latitude

Qlikview is casesensitive.

Can you try same from your application

Note - You don't have license and you are using PE so you exceed number of files opened

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Qlik_Enthu
Creator II
Creator II
Author

Hi  Anil, Can`t I open my own QVW`s as well?

Frank_Hartmann
Master II
Master II

Yes just change to capital letters in expression of chart for long and lat

and also in variables:

Unbenannt.png

Frank_Hartmann
Master II
Master II

you cant open because i saved it and so its no longer your qvw 🙂

Qlik_Enthu
Creator II
Creator II
Author

actually I am not able to open my QVW which I was working locally too