Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
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);
}
Hi Shair,
Pls go through the attachements.