Created
May 14, 2012 19:41
-
-
Save owendall/2696051 to your computer and use it in GitHub Desktop.
City Markers example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <script type='text/javascript' src='https://www.google.com/jsapi'></script> | |
| <script type='text/javascript'> | |
| google.load('visualization', '1', {'packages': ['geochart']}); | |
| google.setOnLoadCallback(drawMarkersMap); | |
| function drawMarkersMap() { | |
| var data = google.visualization.arrayToDataTable([ | |
| ['City', 'Population', 'Area'], | |
| ['New York', 2761477, 1285.31], | |
| ['Baltimore', 1324110, 181.76], | |
| ['New Orleans', 959574, 117.27], | |
| ['Chicago', 907563, 130.17], | |
| ['Des Moines', 655875, 158.9], | |
| ]); | |
| var options = { | |
| region: 'US', | |
| // resolution: 'metros' | |
| displayMode: 'markers', | |
| // colorAxis: {colors: ['green', 'blue']} | |
| }; | |
| var chart = new google.visualization.GeoChart(document.getElementById('chart_div')); | |
| chart.draw(data, options); | |
| }; | |
| </script> | |
| </head> | |
| <body> | |
| <div id="chart_div" style="width: 900px; height: 500px;"></div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment