title: Floating point zoom and setZoom in Google Maps
body: <p>The <a href="https://developers.google.com/maps/documentation/javascript/reference#Map" rel="nofollow">Google Maps documentation</a> says that .zoom and setZoom() expect numbers. Everything would seem to point to these numbers being integers. However, today I gave the latter a floating point value and it worked ... sort of.</p>
  
  <pre><code>var MAP;
  
  function initialize() {
      MAP = new google.maps.Map(document.getElementById('map-canvas'), 
      {
          zoom : 5,
          center : new google.maps.LatLng(-25.610111, 134.354806), 
          mapTypeId : google.maps.MapTypeId.ROADMAP
      });
  }
  </code></pre>
  
  <p>Using the above code, I was able to have debugger access to the MAP object.</p>
  
  <p>Now in the case of continental Australia, if I have a zoom of 4, I get a slice of South East Asia, all of Papua New Guinea and New Zealand and, in the centre, the Great Southern Land. If I have a zoom of 5 I get the mainland but without Tasmania -- definitely a "bad thing". The optimal zoom, discovered using MAP.setZoom() interactively, is 4.3. This is great, except that nothing else works with that zoom. When I try to draw polygons or a heatmap, Maps throws errors like </p>
  
  <pre><code>GET https://khms0.google.com/kh?v=178&amp;hl=en-US&amp;x=0&amp;y=0&amp;z=0.2999999999999998&amp;token=77820 404 (OK)
  </code></pre>
  
  <p>I imagine that the 'z' value above is what's causing the 404 -- khms0.google.com is not expecting a floating point 'z' value.</p>
  
  <p>So how do I get a more appropriately zoomed homeland, with polygons, markers, heatmaps, KML layers and what have you?</p>
  
  <p>By the way, I did try using fitBounds() but it didn't change anything with respect to the visible contents of the viewport apart from shifting the map around a new centre.</p>
  
  <pre><code>var se = new google.maps.LatLng(-44.999315, 156.971343); // Tasman Sea
  var nw = new google.maps.LatLng(-9.063496, 106.346343); // Indian Ocean
  var bs = new google.maps.LatLngBounds(nw,se);
  MAP.fitBounds(bs);
  </code></pre>