I placed a geomap into a content editor web part on our sharepoint
site with the following code: (pretty much straight from the examples)
<html>
<head>
<!-- required only for markers, and only when not specifying lat/
long values --> <script
src='
http://maps.google.com/maps?file=api&v=2&key=xxxxx'
type='text/javascript'></script>
<script type='text/javascript' src='
http://www.google.com/jsapi'></
script>
<script type='text/javascript'>
google.load('visualization', '1', {'packages': ['geomap']});
google.setOnLoadCallback(drawMap);
function drawMap() {
var data = new google.visualization.DataTable();
data.addRows(11);
data.addColumn('string', 'City');
data.addColumn('number', 'Visits');
data.setValue(0, 0, 'Austin');
data.setValue(0, 1, 5);
data.setValue(1, 0, 'Chicago');
data.setValue(1, 1, 10);
data.setValue(2, 0, 'Houston');
data.setValue(2, 1, 3);
data.setValue(3, 0, 'Los Angeles');
data.setValue(3, 1, 17);
data.setValue(4, 0, 'Nashville');
data.setValue(4, 1, 4);
data.setValue(5, 0, 'New York');
data.setValue(5, 1, 26);
data.setValue(6, 0, 'Philadelphia');
data.setValue(6, 1, 8);
data.setValue(7, 0, 'San Antonio');
data.setValue(7, 1, 5);
data.setValue(8, 0, 'San Francisco');
data.setValue(8, 1, 6);
data.setValue(9, 0, 'Washington D.C');
data.setValue(9, 1, 14);
data.setValue(10, 0, 'Toronto, Ontario');
data.setValue(10, 1, 11);
var options = {};
options['region'] = 'US';
options['colors'] = [0xFF8747, 0xFFB581, 0xc06000]; //orange
colors
options['dataMode'] = 'markers';
var container = document.getElementById('map_canvas');
var geomap = new google.visualization.GeoMap(container);
geomap.draw(data, options);
};
</script>
</head>
<body>
<div id='map_canvas' align='center'></div>
</body>
</html>
I was hoping to get some help on how to figure out the best way to get
it to read the data from a sharepoint list? Has anyone done anything
like this? I am new to this and am working my way through it. Any
suggestions would be greatly appreciated!