Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
JoHandyside
Partner - Contributor
Partner - Contributor

Qlikview April 12 Google maps not working (have updated key)

Client is on Qlikview 12 version April 2019.

Google map is no longer working. They have registered account with Google and we have got a key.

I have followed all steps, updated the key in the script, updated link in map and the client has added all the map APIs on the google account.

Map is still grey and blank - points of data are showing 

Link in map is this;

='http://maps.google.com/staticmap?center='
&
num(var_mid_lat, '##############', '.', ',' )
&
','
&
num(var_mid_long, '##############', '.', ',' )
&
'&zoom=$(var_zoom)'
&
'&maptype='&var_maptype
&
'&size='&map_size_x&'x'&map_size_y
&
'&key='&gmap_key & '&.jpg'

 

Script is like this;

// Google Maps Key
// get a key here http://code.google.com/apis/maps/signup.html
// gmap_key = 'xx';

max_zoom_level = 17; //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
];

set hideprefix = 'maptype';

Labels (3)
1 Reply
Brett_Bleess
Former Employee
Former Employee

Have you confirmed no proxy server in play in the environment?

https://support.qlik.com/articles/000031251 

Best I could track down on possible issues related to things not working, so I would recommend checking upon that to be sure that is not in play.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.