0 Replies Latest reply: Jan 27, 2017 1:36 PM by harry kancel RSS

    Google Map Chart - Map error : g.co/staticmap error

    harry kancel

      Hi everybody,

       

      I have a problem with displaying the googlemap in Qlikview.

      In fact,I get an error => Map error : g.co/staticmap error (in the picture).


      My google map code look like this


      // Google Maps Key

      // get a key here http://code.google.com/apis/maps/signup.html

      gmap_key = 'AIzaSyBItFKAlw8oDjPbV_ojN_XzX1pxzAcWclo'; // enter here your Google map key

      max_zoom_level = 17; // How deep you want to drill down in the map? 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)'; // typemap could be roadmap, mobile, satellite, terrain, hybrid

      map_size_x= '600';

      map_size_y= '300';

      map_scale= '2';

       

       

      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

      ];


      please Help !



      thanks a lot