This should work:
var obj = this.features[this.features.length-1];
var geom = obj.geometry;
var L = geom.getLength();
var A = geom.getArea();
alert("Länge:" + L + "\r\nFläche:" + A );
Arnd Wippermann
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von Luciano - Uol
Gesendet: Donnerstag, 25. September 2008 17:17
An: OpenLayers
Betreff: [OpenLayers-Users] Features Attribute
Hi All,
What is the features attribute?
I've this code:
polygonLayer.events.register('featureadded',
polygonLayer,
function(){
var x =
this.features[this.features.length-1].id;
alert(x);
}
);
I'd like to get the area from the polygon that i had draw.
Luciano.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users