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 maps API key signup

Hi,

Can you please advise which services need to be selected in order to sign up for Google Maps API key and use that key in QlikView to develop geographical maps?

I signed up for below services.. am only interested in showing regiona/country maps based on user selections..

Google Maps API v2

Google Maps API v3

Google Maps Coordinate API

Google Maps Geolocation API

Static Maps API

After signup, I am using below URL as Dynamic Image in Colors tab -

http://maps.google.com/staticmap?center=10.75929,14.39395&zoom=1&maptype=satellite&size=640x400&key=...

This link, when tried directly on browser, gives below error -

This web site needs a different Google Maps API key. A new key can be generated at http://code.google.com/apis/maps/.

Appreciate any help to resolve this key issue..

1 Solution

Accepted Solutions
julian_rodriguez
Partner - Specialist
Partner - Specialist

You can use both Google Maps API v2 or v3, but the v2 will be discontinued soon.

The URL error is mentioned and solucionated here: http://community.qlik.com/message/321080#321080

Your color code should be something like this:

='http://maps.google.com/maps/api/staticmap?center='
&
num(var_mid_lat, '##############', '.', ',' )
&
','
&
num(var_mid_long, '##############', '.', ',' )
&
'&zoom=$(var_zoom)'
&
'&maptype='&
var_maptype
&
'&size='&
map_size_x&'x'&map_size_y
&
'&key='&
gmap_key & '&sensor=false'

Regards,

View solution in original post

12 Replies
julian_rodriguez
Partner - Specialist
Partner - Specialist

You can use both Google Maps API v2 or v3, but the v2 will be discontinued soon.

The URL error is mentioned and solucionated here: http://community.qlik.com/message/321080#321080

Your color code should be something like this:

='http://maps.google.com/maps/api/staticmap?center='
&
num(var_mid_lat, '##############', '.', ',' )
&
','
&
num(var_mid_long, '##############', '.', ',' )
&
'&zoom=$(var_zoom)'
&
'&maptype='&
var_maptype
&
'&size='&
map_size_x&'x'&map_size_y
&
'&key='&
gmap_key & '&sensor=false'

Regards,

Not applicable
Author

Perfect.. thanks!

informnes
Contributor II
Contributor II

Dear julian.rodriguez

Thank you very much, the google maps now works.

But there is still a problem:

If you select some values (draw an rectangle over the map), the map doesn't zoom in, like it did before.

I hope u can help me/us.

Kind regards.

Simon

Not applicable
Author

Hi
I made the changes but the map does not appear.

See!

='http://maps.google.com/maps/api/staticmap?center='

&

num(var_mid_lat, '##############', '.', ',' )

&

','

&

num(var_mid_long, '##############', '.', ',' )

&

'&zoom=$(var_zoom)'

&

'&maptype='&var_maptype

&

'&size='&map_size_x&'x'&map_size_y

&

'&key='&gmap_key & '&sensor=false'

Capturar.PNG

julian_rodriguez
Partner - Specialist
Partner - Specialist

Alex:

You must change the value of the variable gmap_key

On this moment you have 'xx' for this variable.

You should change it with a new API v3 valid key. You should go to https://developers.google.com/maps/documentation/javascript/tutorial#api_key and follow the instructions.

Regards

Not applicable
Author

Julian:

ve changed the variable gmap_key = AIzaSyAABZIVacmXaH_m5XNM2PzcJo3uDr12Rzk but does not work.

When I put the string in the browser works

http://maps.google.com/maps/api/staticmap?center=-21.1412387,-47.81152355&zoom=5&maptype=roadmap&siz...

Regards

http://www.sendspace.com/file/lfaz3y

julian_rodriguez
Partner - Specialist
Partner - Specialist

Well, this is weird....

I can't imagine what other problem could you have.

Is it possible to attach a mini version of your document? with only the chart you are having problems?

Not applicable
Author

Yes, the document is the link  http://www.sendspace.com/file/lfaz3y

Regards

julian_rodriguez
Partner - Specialist
Partner - Specialist

May be sounds as a fool's question, but did you reload the document after changing the variable?

I have changed the chart with your key value and it works ...

See the attachment