Hello:
I am dumbfounded by why I am receiving the following error message of
"a is null".
I am populating a Google map via fusion tables. I am trying to trigger
an event every time a marker is clicked. For instance, a tool-tip
should display and the line graph should change to correspond to the
marker(location). If anyone has any suggestions regarding my code
below, it would be greatly appreciated. Thanks in advance,
google.load('visualization', '1', { 'packages': ['corechart'] });
$(initialize);
// end test
var map, layer;
var tableID = 1961290;
var location_column = 'geometry';
//var name = 'G05OJ023';
function initialize() {
// initialize map
var latlng = new google.maps.LatLng(53.760861,
-98.813876);
var myOptions = {
center: latlng,
zoom: 5,
mapTypeId: google.maps.MapTypeId.ROADMAP,
zoomControlOptions: {
style:
google.maps.ZoomControlStyle.SMALL
}
}
map = new
google.maps.Map(document.getElementById("map_canvas"), myOptions);
var layer = new google.maps.FusionTablesLayer({
query: {
select: location_column,
from: tableID
}
});
layer.setMap(map);
// click listener - update graph
google.maps.event.addListener(layer, 'click',
function (e) {
drawVisualization(e.row['name'].value);
// click listener - update info window
contents
//customInfoWindow(e);
});
}
function drawVisualization() {
//var queryText = encodeURIComponent("SELECT
year,average_ground_water_level FROM 1961290");
google.visualization.drawChart({
"containerId": "chart_div",
"dataSourceUrl": 'http://www.google.com/
fusiontables/gvizdata?tq=',
"query": "SELECT
year,average_ground_water_level FROM 1961290",
"refreshInterval": 5,
"chartType": "LineChart",
"options": {
"title": "Test",
"vAxis": { "title": "Average Daily
Groundwater Level - (M)" },
"hAxis": {
"title": "Year"
//
"showTextEvery":"5"
}
}
});
}
google.setOnLoadCallback(drawVisualization);
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.