Unfortunately the link you gave is only for regular polygons.
There is a simple way to calculate area for non regular poly : make
use of the official extension for google earth api ...
But about your problem Oswaldo Guerra, concerning the mousemove curve
(I mean the "draw"), I found how to calculate the distance, and so how
to make the "draw" example into such a curvimeter :
Let's start assuming you have the coords of the "draw" which is in
fact a polyline with very close points.
var zz=[], distance=0;
for (var i=0;i<coords.getLength();i++){
if (i>0) distance
+=parseFloat(distVincenty(coords.get(i-1).getLatitude(),
coords.get(i-1).getLongitude(),coords.get(i).getLatitude(),
coords.get(i).getLongitude() ) );
zz.push( [ distance,
ge.getGlobe().getGroundAltitude( coords.get(i).getLatitude(),
coords.get(i).getLongitude() ) ] );
}
That's it : you now have the total distance along the curve.
zz is an array containing altitude for each point so you also can plot
them to get an elevation profile, with jqplot for example.
The distVincenty function is found here :
http://www.movable-type.co.uk/scripts/latlong-vincenty.html
Now back to area, I've not implemented it, but with the coords of what
is in fact a polygon, one can also get the area with the gearth
extension or an implementation of its methods to calculate polygon
area.