title: Calculate the area of a polygon
body: <p>I need to get the area of a polygon in my map. I looked for an example of <code>new google.maps.geometry.spherical.computeArea</code>, but I can't make it work, and I don't know why.</p>
  
  <pre><code>function dibuV(area){
    var i;
    var a = new Array();
    for(i=0; i&lt;area.length; i++){
      var uno = area[i].split(",");
      a[i] = new google.maps.LatLng(uno[0],uno[1]);
    }
    poligon = new google.maps.Polygon({
      paths: a,
      strokeColor: "#22B14C",
      strokeOpacity: 0.8,
      strokeWeight: 2,
      fillColor: "#22B14C",  
      fillOpacity: 0.35  
    })  
    poligon.setMap(map);//until here is ok 
    var z = new google.maps.geometry.spherical.computeArea(poligon.getPath());
    alert(z); //this is not working
  }
  </code></pre>