Re: How do you change the center of a GeoChart?

393 views
Skip to first unread message

Sergey

unread,
Oct 18, 2012, 3:32:30 PM10/18/12
to google-visua...@googlegroups.com
Hi, unfortunately there is no such option at this time. I'm afraid that the best that you can currently do is to set the 'region' option to 'auto' and that will pick the map that includes all of your markers.

On Thursday, October 18, 2012 3:01:16 PM UTC-4, Chloe S. wrote:
I'm working with marine scientists and they take samples off the coast. I would like to change the center of the chart to be off the coast. I would like to give a latitude/longitude pair for the center of the chart, or two latitude/longitude pairs for a window/view of the map area, or specify multiple states like US-CT-NY. I'm hoping there is a hidden API like geochart.center = {lat: 89, long: -127}.

function drawVisualization({
  var data google.visualization.arrayToDataTable([
    ['Lat''Long''Popularity'],

    [41.083333333276-73.3999999997820.4 ],
    [41.083333333276-73.3999999997820.6 ],
    [41.099550000113-73.41540000007819.0 ]
  ]);

  var options {title:'Temperature'region:'US-CT'resolution:'metros'width556height347};
  var geochart new google.visualization.GeoChart(
      document.getElementById('visualization'));
  geochart.draw(dataoptions);
} 

Chloe S.

unread,
Oct 18, 2012, 4:19:49 PM10/18/12
to google-visua...@googlegroups.com
That doesn't help. Some of the data is bad, and it gives errors like  Requested map does not exist.

For example, try adding these lines:

    [41.083333333276-52.3999999997818.6 ],
  var options {title:'Temperature'region:'auto'resolution:'metros',  width556height347};

Sergey

unread,
Oct 18, 2012, 4:26:56 PM10/18/12
to google-visua...@googlegroups.com
Unfortunately, you're right. One way to fix this is to specify the resolution to be 'provinces' or 'countries', but that seems to be even more broken. I don't have any better advice for you at this time.
Reply all
Reply to author
Forward
0 new messages