title: Google Maps v3 map.getBounds().containsLatLng is not a function
body: <p>How do i set the "setMap" function here to port this code to v3? Or port it generally to v3...</p>
  
  <p>// map recenter, if element is outside the mapscreen</p>
  
  <pre><code>while ((!map.getBounds().containsLatLng(marker.getPosition())) &amp; (showAllCategoryElements == 0)) {
          var newCenterPointLng = (map.getBounds().getCenter().lng() + marker.getPosition().lng()) / 2;
          var newCenterPointLat = (map.getBounds().getCenter().lat() + marker.getPosition().lat()) / 2;
          map.panTo(new google.maps.LatLng(newCenterPointLat, newCenterPointLng));
          map.setCenter(new google.maps.LatLng(newCenterPointLat, newCenterPointLng));
          if (!map.getBounds().containsLatLng(marker.getPosition())){
              map.zoomOut();
          }
  </code></pre>
  
  <p>here is an example <a href="http://d.hatena.ne.jp/tsmsogn/20111216/1324026723" rel="nofollow">http://d.hatena.ne.jp/tsmsogn/20111216/1324026723</a>
  some tips: markus.tao.at/geo/google-maps-api-v3-is-in-town/</p>
  
  <p>i also import <a href="https://github.com/tparkin/Google-Maps-Point-in-Polygon" rel="nofollow">https://github.com/tparkin/Google-Maps-Point-in-Polygon</a> js to get "containsLatLng" support</p>
  
  <p>Thanks for help or tips</p>