[fusion-commits] r2007 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Dec 2 21:33:04 EST 2009
Author: christinebao
Date: 2009-12-02 21:33:03 -0500 (Wed, 02 Dec 2009)
New Revision: 2007
Modified:
trunk/widgets/Measure.js
Log:
Fix ticket http://trac.osgeo.org/fusion/ticket/343
Measure: Area is wrong when unit of Map CS is feet
Modified: trunk/widgets/Measure.js
===================================================================
--- trunk/widgets/Measure.js 2009-12-02 21:26:25 UTC (rev 2006)
+++ trunk/widgets/Measure.js 2009-12-03 02:33:03 UTC (rev 2007)
@@ -296,7 +296,13 @@
var cg = geom.getCentroid();
at = this.getMap().geoToPix(cg.x, cg.y);
quantity = geom.getGeodesicArea(proj);
- //TODO: result is in square meters - convert to other units?
+
+ measureUnits = Fusion.METERS;
+ if (measureUnits != this.units) {
+ var rate = Fusion.convert(measureUnits, this.units, 1);
+ quantity = quantity * rate * rate;
+ }
+
}
if (quantity > 1) {
marker.setQuantity(quantity);
More information about the fusion-commits
mailing list