zoomLevel option for Maps

77 views
Skip to first unread message

PeterE

unread,
Jul 14, 2010, 2:10:28 PM7/14/10
to Google Visualization API
The documentation for the Map visualization mentions a zoomLevel
configuration option that sets the initial zoom level of the map. But
in my test code (below), I set zoomLevel to be all kinds of numbers
from 0 to 19 yet I didn't see any difference in how the map initially
loaded -- it didn't seem to have any effect.

Any suggestions on what I'm doing wrong? Sorry if I am missing
something obvious.

<html>
<body>
<div id="map_div" style="width: 300px; height: 300px">
<script type="text/javascript" src="http://www.google.com/jsapi"></
script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["map"]});
google.setOnLoadCallback(drawMap);
function drawMap() {
var data = new google.visualization.DataTable();
data.addColumn('number', 'Lat');
data.addColumn('number', 'Lon');
data.addColumn('string', 'Name');
data.addRows(1);
data.setCell(0, 0, 37.79548);
data.setCell(0, 1, -122.40324);
data.setCell(0, 2, '600 Montgomery, SF CA');

var map = new
google.visualization.Map(document.getElementById('map_div'));
map.draw(data, {zoomLevel: 10, mapType: "normal", showTip:
true, enableScrollWheel: true });

}
</script>
</body>
</html>

Viz Kid

unread,
Jul 19, 2010, 7:06:13 AM7/19/10
to google-visua...@googlegroups.com

Hi.

Indeed there seem to be some problem with the zoomLevel option although it happens only for some scenarios and not all of them. We will try to look into it.

Best,
  Viz Kid


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


Ra

unread,
Dec 3, 2011, 6:08:48 PM12/3/11
to google-visua...@googlegroups.com
There is already more than one year. But this bug is still here. Disappointing!
Reply all
Reply to author
Forward
0 new messages