Google maps (v3) and Cognos 8.4 - google undefined

341 views
Skip to first unread message

Web Developer

unread,
Dec 30, 2011, 10:16:27 AM12/30/11
to google-map...@googlegroups.com
I found some sample code to get me started (http://www.ironsidegroup.com/2011/10/17/embed-google-maps-in-ibm-cognos-reports/)...

I'm trying to use google maps inside of a cognos report.  This seems pretty straight forward but I'm getting a javascript error.

Can anyone help me out?  Thanks.

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<div id="map" style="width:700px;height:400px;"></div>

<script type="text/javascript"">

if (typeof google == 'undefined') {
    alert('bummer, google is undefined.');
}
else {

var latlng = new google.maps.LatLng(40.756,-73.986);

var options = { center: latlng, zoom:1, mapTypeId: google.maps.MapTypeId.ROADMAP };

// creating the map

//var map = new google.maps.Map(document.getElementById('map'),options);
//var geocoder = new google.maps.Geocoder();

function AddMarker (address) {
    alert('in here');

}

} // end google undefined
</script>
Reply all
Reply to author
Forward
0 new messages