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>