[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Cognos Report - Google Maps (Multiple Points)

Asked by Hodges in ReportNet, JavaScript, Web Development, Web Development

Tags: Cognos Report Studio Google Maps Multiple

How can I plot multiple points on a map based upon multiple address in a list report?

I can plot one at a time by adding a HTML tag ("Show Map") as below:

'<a href="#" onClick="displayMap( '''+ [Query1].[Address]  +', '+[Query1].[PostCode] +', '+[Query1].[Country]+''')">  Show Map</a>'

Then have the google map display the results:

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key="GOOGLEKEY"
      type="text/javascript"></script>
<div id="map" style="width: 500px; height: 400px"></div>
<script type="text/javascript">
var map = new GMap2(document.getElementById("map"));
var geocoder = new GClientGeocoder();

function showAddress(address) {
      if (geocoder) {
            geocoder.getLatLng(address, function(point) {
                  if (!point) {
                        alert(address + " not found");
                  } else {
                        map.setCenter(point, 15);
                        var marker = new GMarker(point);
                        map.addOverlay(marker);
                        map.openInfoWindowHtml(map.getCenter(), address);

                        map.addControl(new GSmallMapControl());
                        map.addControl(new GMapTypeControl());
                        map.checkResize();
                  }
            });
      }
}

var firstTime=1;
function displayMap (address)  {
      showAddress(address);
      if(Number(firstTime) > 0 ) {
            firstTime = 0;
            showAddress(address);
      }
}

</script>

This is as per the Cognos Support site. But how can I plot multiple addresses (e.g. all addresses returned for a query to identify locations of customers etc.)
 
Related Solutions
Keywords: Cognos Report - Google Maps (Multi…
 
Loading Advertisement...
 
[+][-]06/27/09 03:16 AM, ID: 24727124Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06/27/09 03:17 AM, ID: 24727127Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06/29/09 01:59 PM, ID: 24740193Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/29/09 02:05 PM, ID: 24740242Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/29/09 02:07 PM, ID: 24740255Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/29/09 02:42 PM, ID: 24740546Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625