D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
aaizemberg
Full window
Github gist
América del Sur
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>mapa</title> </head> <body> <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(drawRegionsMap); function drawRegionsMap() { var data = google.visualization.arrayToDataTable([ ['Pais', 'Poblacion'], ['Argentina', 200], ['Brazil', 100], ['Uruguay', 100], ['Paraguay', 100], ['Chile', 100], ['Peru', 100], ['Bolivia', 100], ['Ecuador', 100], ['Colombia', 100], ['Venezuela', 100], ['French Guiana',100], ['Guyana',100], ['Suriname',100], ['Falkland Islands',100] ]); var options = { region: '005', // 005 - South America // 013 - Central America // 029 - Caribbean // 021 - Northern America colorAxis: {colors: ['#1f77b4', '#bdbdbd', '#d62728']}, backgroundColor: 'lightgrey', datalessRegionColor: 'white', defaultColor: '#f5f5f5', }; var chart = new google.visualization.GeoChart(document.getElementById('mapa')); chart.draw(data, options); } </script> </head> <body> <div id="mapa" style="width: 300px; height: 350px;"></div> </body> </html> </body> </html>
https://www.google.com/jsapi