Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
1. exclude all non european countries from your csv list
2. can you show a screenshot of this misbehaviour?
Hi Frank,
I have uploaded the coordinates from a web file and in the screen shot you can see the there is a plot appears in the bottom left corner of the map. I want that to be over France. similarly for other countries as well. the scattered chart bubbles are not over the correct coordinates
it also seems that the link to the map is corrupted(right top corner).
try using this expression for dynamic image, and see if the bubble is still on the wrong position:
='http://maps.google.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'
Hi this code is not making any changes
see attached file and try to adapt it to your requirement.
for me this works fine.
hope this helps
hi frank, I don`t see any attachment.
you will have to use this link:
issue in getting plots on a google map in qlikview
if you are watching this thread through your inbox you wont see any attachments.
Map Is getting refreshed but unable to see the bubbles
ok, i see two possible errors:
1. Your lat long values are incorrect. Please check here:
Latitude and Longitude Finder on Map Get Coordinates
2. Your "lat, long, country, city" Table is not connected to your "Sales" Table by a common field.