Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
shair_abbas
Partner - Creator
Partner - Creator

Error in loading Google Map in QlikView

I want o use google map in QlikView but Qv.LoadScript didn't access the google api !!!
I've printed the error massage in alert Window. But it is not clear as well:
qlikView_error.PNG

Here is my Script:

// Map div

var html = "<div id=\"googleMap\" style=\"width:500px;height:380px;\"></div>";

try

  {

  Qva.LoadScript("http://maps.google.com/maps/api/js", loadmap());

  }

catch(error)

  {

      window.alert("Cannot Load Script. " + error.message);

  }

function loadmap() {

  Qv.AddExtension("MapTest",function () {

$( document ).ready()

{

  try

  {

  google.maps.event.addDomListener(window, 'load', Initialize_Google_Map);

  }

  catch(error)

  {

  window.alert("On Google Load Error : " + error);

  }

}

  this.Element.innerHTML = "Google Map Extension Test" + html;

  });

}

function Initialize_Google_Map()

{

  var mapProp = {

    center:new google.maps.LatLng(51.508742,-0.120850),

    zoom:5,

    mapTypeId:google.maps.MapTypeId.ROADMAP

  };

  var map=new google.maps.Map(document.getElementById("googleMap"), mapProp);

}

2 Replies
Chanty4u
MVP
MVP

ramasaisaksoft

Hi Shair,

Pls go through the attachements.