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

Google Map is not working both in desktop and access point

Hi All,

This is the issue related to Google Map. 3 months before background image of  google map was properly loading and all the figures and data was coming right. But now a days i am facing problem with google map background image both in desktop as well as access point. Following are the script I am using:

(a)

gmap_key = '//key';

max_zoom_level = 5; //maximum value 17

def_map_size = 400;

// 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= '400';

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 ];

(b)

LOAD City,

     Latitude,

     Longitude,

     Sales

FROM

[GoogleMapExcel.xlsx]

(ooxml, embedded labels, table is Sheet1);

Kindly help me to solve this issue. I will be very thankful to all.

5 Replies
MK9885
Master II
Master II

I believe they've suspended this service for static images. Why don't you use a Google Map Extension instead?

Google Cluster or marker ?

Not applicable
Author

@ Andre: I have tried with this as you mentioned above. but still issue is same. Background google map is not coming in chart only bubble is coming. But anyway thanks for helping me. If anyone have different idea to resolve this issue. So please let me know.

Not applicable
Author

@ Shahbaz : is Google Map Extension work in access point.  If yes so please let me know what is the procedure to create extension for that. I am new in qlikview so  I am not able to find how to do this. Your help will be very helpful to me. Thanx in advance.

MK9885
Master II
Master II

Yes, for sure it works in access point, at least for me. Though I've quite a few complaining about .js error but this extension should world fine for you. (Extensions work only in webview mode)

This is provided by Alexander Karlsson but I edited his script to fit my requirements. Please find the attachment, unzip it, paste it in your local folder first to build a map

Local folder path for Qlikview Extensions:  C:\Users\username\AppData\Local\QlikTech\QlikView\Extensions

Server folder path for Qlikview Extensions: % ProgramData% \ QlikTech \ QlikViewServer \ Extensions \ Objects

Note: This requires a license when you use this extension in production. However there is a free extension as well, 'SVG Maps.' Follow same steps for SVG Maps as well and the load path for svg should be 'world.svg' if world map, us.svg for US map, India.svg for India map and so on... You can only build one geographic location at a time in svg and you'll need StateID or CountryID which will be 2 alphabets. Ex: for Unites States 'US' for Delhi 'DL' etc...

You can find SVG Map in this community.