Dear All,

I require your assistance in the following:

Below is a sample code gratefully offered by Google in how to create a dot 
map charts where the dot markers are referred as 'city'

my question is, if I want to add a city (that i have its coordinates) not 
recognized/implemented in Google API  inside the array , how am I able to 
do so? (ease of reference I added the arrow on the line that I wish to 
implement)

<html>
  <head>
    <script type='text/javascript' 
src='https://www.gstatic.com/charts/loader.js'></script>
    <script type='text/javascript'>
     google.charts.load('current', {
       'packages': ['geochart'],
       // Note: you will need to get a mapsApiKey for your project.
       // See: 
https://developers.google.com/chart/interactive/docs/basic_load_libs#load-settings
       'mapsApiKey': 'AIzaSyD-9tSrke72PouQMnMX-a7eZSW0jkFMBWY'
     });
     google.charts.setOnLoadCallback(drawMarkersMap);

      function drawMarkersMap() {
      var data = google.visualization.arrayToDataTable([
        ['City',   'Population', 'Area'],
        ['Rome',      2761477,    1285.31],
        ['Milan',     1324110,    181.76],
        ['Naples',    959574,     117.27],
        ['Turin',     907563,     130.17],
        ['Palermo',   655875,     158.9],
        ['Genoa',     607906,     243.60],
        ['Bologna',   380181,     140.7],
        ['Florence',  371282,     102.41],
        ['Fiumicino', 67370,      213.44],
        ['Anzio',     52192,      43.43],
        ['Ciampino',  38262,      11],

 ====>       [ 'Adding NEW CITY with Latitude Longitude",   55555, 100]



      ]);

      var options = {
        region: 'IT',
        *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>

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/5580ac0e-5e51-45ff-b4c1-3075e7400bd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to