Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
I have a problem visualizing Google Map in my QV app. I used the tutorial provided in the example apps that come with QlikView. Here is my script :
LOAD Country,
latitude,
longitude
FROM
C:\Users\p\Desktop\Book1.xls
(biff, embedded labels, table is Sheet1$);
// Google Maps in QlikView
// V0.85.2 - October 1st 2008 © Copyright QlikTech International AB 2008 / AES
// Google Maps Key
// get a key here http://code.google.com/apis/maps/signup.html
gmap_key = 'ABQIAAAALqZV4zqosXzo1zjk-V-RjhQdYDUhTQkgVpRgMNAdEysOQ-V4nhQPXXWjMgCoteiMmV0KhC9MDkzbAg';
max_zoom_level = 7; //maximum value 17
// Variables required for calculating map
// No need to change these
var_pi180= '=pi()/180';
var_lat_offset= '0';
var_mc2= '=256*pow(2,$(var_zoom))';
var_mc1= '=256*pow(2,($(var_zoom)-1))';
var_mid_lat= '=min(latitude)+(1+var_lat_offset)*((max(latitude)-min(latitude))/2)';
var_mid_long= '=min(longitude)+(max(longitude)-min(longitude))/2';
var_zoom= '=max(aggr(if(max( round(256*pow(2,(_zoom_level -1)))+( longitude *((256*pow(2,_zoom_level ))/360)) )-min( round(256*pow(2,(_zoom_level -1)))+( longitude *((256*pow(2,_zoom_level ))/360)) ) <map_size_x AND max((256*pow(2,(_zoom_level-1)))+((0.5*log((1+(sin((latitude)*pi()/180)))/(1-(sin((latitude)*pi()/180)))))*((-256*pow(2,_zoom_level))/(2*pi()))))-min((256*pow(2,(_zoom_level-1)))+((0.5*log((1+(sin((latitude)*pi()/180)))/(1-(sin((latitude)*pi()/180)))))*((-256*pow(2,_zoom_level))/(2*pi()))))<map_size_y,_zoom_level,1),_zoom_level))';
var_maptype= '=if(isnull(only(maptype)),fieldvalue( '&chr(39)&'maptype'&chr(39)&', 1 ),maptype)';
map_size_x= '640';
map_size_y= '400';
SET HidePrefix='_' ;
// Field required for calcualting best zoom level
_zoom_level:
Load RecNo( ) as _zoom_level autogenerate(max_zoom_level);
maptype:
LOAD * INLINE [
maptype
roadmap
mobile
satellite
terrain
hybrid ];
Thanks!
 
					
				
		
Hi
Check your latitude longitude are in the good format (WGS84), maybe a problem with comma or dot that you can set in the script.
Post your geo-data if the problem persirsts.
JJ
 
					
				
		
Hi,
First, select a roadmap in your application.
Regards,
 
					
				
		
Hi
Check your latitude longitude are in the good format (WGS84), maybe a problem with comma or dot that you can set in the script.
Post your geo-data if the problem persirsts.
JJ
 
					
				
		
Thanks! That was the problem. Now everything works.
 
					
				
		
HI, i had the same problem and your response was the solution, thanks 
 
					
				
		
 fedcas
		
			fedcas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
my document has the following sets:
SET ThousandSep='.';
SET DecimalSep=',';
How can I set the good format (WGS84) using only for longitude and latitude??
Many thanks!!!
 
					
				
		
Quick question.
Do you have the list of all the countries with their lon/lat coordinates? I am trying to find this list that i am pretty sure someone should have already. How can i get it?
Thanks
Ricardo
 
					
				
		
Hi;
please find the long / lat of all countries
JJJ
