Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Google Maps Integration Gone? Anyone else?

Is anyone else having trouble with the Google Maps layer disappearing from existing Qlikview applications?  As of today nothing on either desktop or server-hosted Qlikview has a Google map in the background.

We're running Qlikview 11.

I tested the Qlikview-generated URL, which is

http://maps.google.com/staticmap?center=38.097986,-106.0454515&zoom=2&maptype=&size=800x300&key=xx&....

It generates a 403 error with the following documentation:

This error (HTTP 403 Forbidden) means that Internet Explorer was able to connect to the website, but it does not have permission to view the webpage.

For more information about HTTP errors, see Help

35 Replies
Not applicable
Author

Anyone an Idea?

Just one more thing: seems i shredered something.. I cant search for longitude and latitude. My search strings are: zagreb, Hrvatska (city and country). Can yiou pls just check the script below?

let noRows = NoOfRows('GoogleMaps')-1;

for i=0 to $(noRows)

          let a=peek('CUSTACCOUNT',$(i),'GoogleMaps');

       //let b=peek('LastName',$(i),'Table1');

       //let c=peek(‘ProductSold’,$(i),'Table3');

          let b=peek('Adresa',$(i),'GoogleMaps');

Data:

          LOAD

          '$(a)' as [Kupac šifra],

          //'$(b)' as LastName,

          //'$(c)' as ProductSold,

          '$(b)' as Adresa,

          subfield([Response/Placemark/Point/coordinates], ',' ,1) AS longitude,

          subfield([Response/Placemark/Point/coordinates], ',' ,2) AS latitude

          FROM [http://maps.googleapis.com/maps/geo?q=$(b)&output=xml&oe=utf8&sensor=false&key=] (XmlSimple, Table is [kml]);

next i;

Not applicable
Author

Hi all,

I too have the issue with the background Google Map vanishing (although the 'dots signifying the locations still appear. My problem is that I cannot work out where the script is picking up the map from (the only relevant parts have been commented out).

Any ideas please?

Data:
LOAD * INLINE [
Service,latitude,longitude

Example Data ,51.337368,-0.010686


];

// Google Maps in QlikView
// V0.9 - October 1st 2008  © Copyright QlikTech International AB 2008 / AES

// Google Maps Key
// get a key here http://code.google.com/apis/maps/signup.html
//gmap_key = 'xx';
max_zoom_level = 11; //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';

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

Any ideas? T

Not applicable
Author

You need two things -

STEP ONE - GET AN API KEY

First, a Google API code for the new API - Version 3.0.  Whereas past versions of maps worked OK with "key = xx" they want you to have an actual key now.  Make sure it's for API version 3, not version 2, because version 2 is going away if it's not already gone.

So in the load script, your only change is to replace

  

gmap_key = 'xx';

 

with

gmap_key = ' YOUR_KEY_GOES_HERE';

  

and reload.

STEP TWO - MODIFY THE COLOR OF YOUR MAP

 

The background map is controlled by the Color aspect of the
object. 

 

1 - Make sure the transparency is set to zero percent, and

 

2 - replace the Dynamic Image text with this text - This is the map instruction for the V3.0 API, which is different from the old instruction.  The old instruction won't work because the Key (above) is for the new API.  Here's the text:

 

='http://maps.googleapis.com/maps/api/staticmap?center='&var_mid_lat&','&var_mid_long&'&zoom=$(var_zoom)'&'&maptype='&var_maptype&'&size=800x300'&'&key='&gmap_key&'&sensor=false'


Not applicable
Author

Thanks Noah, I understand that Google have made some changes which need to be dealt with in QlikView  but what I dont understand is the map address (in bold above) has been commented out (//) over the last 18 months and has been reloaded every week with no problems. I was under the impression if a line of script is prefaced with //, it is disregarded by QlikView. Is this different because of the Google Map interface?

Not applicable
Author

Ahh, now I understand. 

The script does not generate the map.  All it does is create fields and variables used later to create the map.

You're not imagining things.  The commented out code in the script is still nonfunctional and irrelevant.

The map is created outside of the script by specifying it as a background image to your chart.  Essentially, you are plotting your locations on a simple graph, as dots or balls or whatever.  The fields and variables are used to define where those dots appear on the chart.

The map is the background image for the chart.  It's generated in the chart itself, by using the code shown above to request a specific image from the Google Map API.  That code defines the scale of the map, its size, and where it's centered.

Hope this helps,

-Noah

Not applicable
Author

Thanks Noah, I have tried your code in the Dynamic Image expression field but I’m still having no luck I’m afraid. (the ‘dots’ are still showing but the map is not)

I’m still using QlikView 9 on a Terminal Server – could this affect the solution?

Not applicable
Author

Hi Matt

We have the same issue and are also running Qlikview 9 SR3.

I have tried on our Terminal Server and also did a local install on my home PC of the same release as suspected it was the Terminal Server but had the same result.

Has anyone successfully created a Google map in QV or Qlikview 9 since the middle of last week???

Regards

Dave

Not applicable
Author

Hi Matt

We have the same issue and are also running Qlikview 9 SR3.

I have tried on our Terminal Server and also did a local install on my home PC of the same release as suspected it was the Terminal Server but had the same result.

Has anyone successfully created a Google map in QV or Qlikview 9 since the middle of last week???

Regards

Dave

Not applicable
Author

I have no experience with QV in versions earlier than 11 (I'm a newbie.)  I suggest you start a new thread, and make it specific to Qlikview 9 issues, which may get you more specific responses.

Best of luck,

-Noah

Not applicable
Author

I have downloaded Qlikview 11 and the mapping issue  as previously stated is fixed

So anyone using Qlikview 9 I suggest upgrading your QV version

Regards

Dave