Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Extensions problem with external JS

Hi All,

I have a little challenge with extensions. I am trying to include the GoogleMaps API. I know the solution on static maps but this is not satisfaying enough for my needs. Therefore I thought about writing my own extension. But for some reason I can't get it working. The below is a simplified extract, which simply loads the JS script from Google and then should create an object based on the Google API. Unfortunately, the execution stops after the alert("in") statement. I believe the latlng object can't be created because the Google Javascript is unknown (although loaded before).

Any ideas? Here is the code...

Qva.AddExtension('GoogleMaps', function() {

var script = document.createElement("script")

script.setAttribute("type", "text/javascript");

script.setAttribute("src", "http://maps.google.com/maps/api/js?sensor=true");


script = document.createElement("script");

script.setAttribute("type", "text/javascript");


alert (this.Element.innerHTML);



function initialize() {

alert ("in");

var latlng = new google.maps.LatLng(48, 8);


var myOptions = {

zoom: 4,

center: latlng,

mapTypeId: google.maps.MapTypeId.SATELLITE





Tags (1)
5 Replies
Not applicable

Extensions problem with external JS


Did you get this working as I have jsut started to look at the same thing?  I don't really understand javascript at the moment so i'm learning it as i go along



Not applicable

Extensions problem with external JS

Here's a sample of integrating Google Maps JavaScript v3 API into QlikView.


Not applicable

Extensions problem with external JS


Thats brilliant thanks - that will give me something to work from - next stop Dummies guide for JavaScript!



Not applicable

Extensions problem with external JS


I get an error when I try to use this.  An image of the map shows fine but when I try to go into properties and select layout or anything an error message pops up with the message Error: 'style' is null or not an object

Any ideas?

Also, once you've got the map, how do you go about showing data points on it?



Not applicable

Re: Extensions problem with external JS

Hi Jay!

was wondering if you got the map integrated with your datamodel in QV?

would like to dynamically load data points onto the map.



Community Browser