Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Binary load Google maps

Hi there all,

I recently worked with google maps in qlikview so far so good. Got the right map and everything worked fine. But now i try to do a binary load and then the maps don't appear anymore. I can see the spots etc but not the map underneath.

What''s going wrong. Because in the file where the script is reloading the maps are okay, but in the document where i do a binary load and copied the maps into a new sheet there's nothing to appear.

Can anyone help me with that?

Thanks a lot!!!

1 Solution

Accepted Solutions
Not applicable
Author

Erich is right!

I copied the script variable relating to the google map into the new QVW and re-ran it and it started working perfectly! In the map app I used they look like this so should be similar in yours:

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

map_size_y=     '400';

View solution in original post

8 Replies
Not applicable
Author

Just to make sure I follow what you are doing, you've created a second QVW into which you are binary loading the data from your original file. You have then copied the map from your first QVW into the new one?

Not applicable
Author

Yes that is correct. The binary load is just for performance of the server

Not applicable
Author

Don't see why that shouldn't work. I'll give it a try and see what happens. What version of QV are you running.

Not applicable
Author

version 10. I exactly copy the objects and still the background of the map isn't showing. Nothing to do with another machine or internet or anything i can think of.

Thanks for helping!

Not applicable
Author

I finally got round to trying this in v10 and it failed for me too. Not sure why yet but will have a play and see if I can work it out.

erichshiino
Partner - Master
Partner - Master

Hi,

I believe you have to copy the script tab with the google maps variables.I don't think that binary load will copy the variables, but just the tables.

Regards,

Erich

Not applicable
Author

Erich is right!

I copied the script variable relating to the google map into the new QVW and re-ran it and it started working perfectly! In the map app I used they look like this so should be similar in yours:

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

map_size_y=     '400';

Not applicable
Author

Thanks for helping. It worked fine now! I really didn't know that a binairy load didn't take the variables too.