title: computeArea() return [object object] in google map api v3
body: <p>Got into trouble when trying to compute the area of a rectangle</p>
  
  <p>Here's <a href="http://web-9v2fudsqpo.treehouse-app.com/" rel="nofollow">a link</a> to the website I created.</p>
  
  <p>The rectangle has been properly drawn, but the calculation of area is wrong.</p>
  
  <p>Below is my code in JavaScript:</p>
  
  <pre><code>  var Area;
    var areaPath;
    function initialize() {
      var map = new google.maps.Map(document.getElementById('map-canvas'), {
        zoom: 11,
        center: new google.maps.LatLng(39.912106, 116.397346),
        mapTypeId: google.maps.MapTypeId.ROADMAP
      });
  
      var rectBoundsLatlng = new Array;
      var rectBoundsLatlngPath = new Array;
  
      rectBoundsLatlng[0] = new google.maps.LatLng(39.907679, 116.342119),
      rectBoundsLatlng[1] = new google.maps.LatLng(39.950330, 116.394133),
      rectBoundsLatlngPath[0] = new google.maps.LatLng(rectBoundsLatlng[1].lat(),rectBoundsLatlng[0].lng()),
      rectBoundsLatlngPath[1] = new google.maps.LatLng(rectBoundsLatlng[0].lat(),rectBoundsLatlng[1].lng())
  
      var areaPath = [
        rectBoundsLatlng[0],
        rectBoundsLatlngPath[0],
        rectBoundsLatlng[1],
        rectBoundsLatlngPath[1],
        rectBoundsLatlng[0]
      ];
  
      Area = new google.maps.geometry.spherical.computeArea( areaPath );
      alert(Area);
  
     }
     google.maps.event.addDomListener(window, 'load', initialize);
  </code></pre>
  
  <p>Hopefully there is someone who can help me with this.
  BTW, the geometry library has been included already.</p>