I have a Google Fusion Table and I need to display together a Map with the polygons of the FT in a layer and, at the same time, a scatter Chart with two values of this polygons. But I'm falling (I'm a starter) getting that when a polygon is selected in the map it becomes selected also in the chart (and the other way around).
This is my code... I'm lost in the 'google.visualization.events.addListener'. <script type="text/javascript"src= "http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('visualization', '1', { packages: ['corechart'] }); function initialize() { var malaga = new google.maps.LatLng(36.721261,-4.4212655); var map = new google.maps.Map(document.getElementById('map-canvas'), { center: malaga, zoom: 13 }); layer = new google.maps.FusionTablesLayer({ query: { select: "", from: '1P_xBHR8RRndRON43IveLzU5SRwAjsmF4v0PWm2U', where: "" }, }); layer.setMap(map); drawVisualization(); google.visualization.events.addListener(layer, 'click', function() { drawVisualization.setSelection(layer.getSelection()); }); } function drawVisualization() { google.visualization.drawChart({ containerId: 'chart-canvas', dataSourceUrl: 'http://www.google.com/fusiontables/gvizdata?tq=', query: "SELECT GSI, FSI FROM 1P_xBHR8RRndRON43IveLzU5SRwAjsmF4v0PWm2U", chartType: 'ScatterChart', }); } </script> </head> <body onload="initialize()"> <div id="chart-canvas"><br> </div> <div id="map-canvas"> </div> </body> </html> -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/groups/opt_out.
