Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
We have implemented Google Map in our qlikview application through google api:
gmap_key = 'QIAAAA5WrL_l-qI2agDqMYfGRG6BRJePNg4JCgwr1gUAo3Qr5Dl'; max_zoom_level = 10; //maximum value 17 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 ];
and in chart expression:
'http://chart.apis.google.com/chart?cht=t&chs=440x220&chd=s:_&chtm=' & If(GetPossibleCount([Google Area Code])=1,[Google Area Code],'world') & '&chco=FFFFFF,FFB5B5,FFFFB5,BAFEA3&chld=' & Concat(If(Sum(actualsales) / Sum(targetsales)> 0 AND CountryID <> 'N/A', CountryID, ''), '') & '&chd=t:' & Concat(If(Sum(actualsales) / Sum(targetsales)>0 AND CountryID <> 'N/A', (If(Sum(actualsales) / Sum(targetsales) > 0.95, If(Sum(actualsales) / Sum(targetsales))> 0.9999, 100, 50), 0))),CountryID),',') & '&chf=bg,s,ECF4FF'
It was working fine in access point for long time but it stopped working suddenly after recent reload.
Intead of map we are getting http://..... http://chart.apis.google.com/chart?cht=t&chs=440x220&chd=s:_&chtm=world&chco=FFFFFF,FFB5B5,FFFFB5,BA... link. Even copy of generated link working in browser but not working in accesspoint.
Kindly help.