Hi,
I have been trying to incorporate a map into my personal edition qlikview file but struggling to do so. I have watched a number of videos and read documentation but can't seem to work out where I am going wrong. I am using the below script with my google maps API key as below but no map is showing when I load it. All it says is No Data To Display.
Anyone able to help me out? Unfiorutnaly I'm using the PE version so unable to open files made by others currently. I'm trying to use the tool to get some traction on its uses and application.
Any help would be great,
// Google Maps Key
// get a key here http://code.google.com/apis/maps/signup.html
// gmap_key = 'AIzaSyAewzZ6dSxxxxxxLxwQRzhH4Opymrh7LA050';
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= '690';// '640';
map_size_y= '250';//'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
];