Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have been calling Google maps API in Qlikview for the past year, and it was working fine. However, recently when i reload my data, the map is unable to be displayed (blank).
Please help! As the mapping is important in my course of work. Thanks!
Below is my script:
// 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.htmlgmap_key = 'AIzaSyBvmmnBumwuXqDjJxhz7aQFqhUfi_hcMJc';max_zoom_level = 17; //maximum value 17
// Variables required for calculating map// No need to change thesevar_pi180= '=pi()/180';var_lat_offset= '0';var_long_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 [maptyperoadmapmobilesatelliteterrainhybrid];
Data:LOAD * INLINE [POD,Index,GDP_PPP_M, latitude, longitudeNagoya, 11111, 111111, 35.090622, 136.878141Laem Chabang, 11111, 22222, 13.067392, 100.903845Cai Mep, 2222, 22222, 10.543745, 107.028514Kaohsiung, 3333, 33333, 22.599441, 120.288098Xiamen, 4444, 44444, 24.491402, 118.082175Hongkong, 55555, 55555, 22.305987, 114.169549Yantian, 6666, 66666, 22.576286, 114.265590