[fusion-commits] r1253 - trunk/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Mar 13 17:25:02 EDT 2008


Author: assefa
Date: 2008-03-13 17:25:02 -0400 (Thu, 13 Mar 2008)
New Revision: 1253

Modified:
   trunk/widgets/Maptip.js
Log:
calculate the cellsize (#27)

Modified: trunk/widgets/Maptip.js
===================================================================
--- trunk/widgets/Maptip.js	2008-03-13 21:22:14 UTC (rev 1252)
+++ trunk/widgets/Maptip.js	2008-03-13 21:25:02 UTC (rev 1253)
@@ -130,9 +130,15 @@
         if (map == null) {
           return;
         }
-        var cellSize = map._nCellSize;
-        cellSize = 1e-6;
 
+        var oSize = map.getSize();
+        var oExtents = map.getCurrentExtents();
+
+        //caluclte the cell size and use 2 times the cellsize of the query 
+        var cellSize = oExtents.getWidth()/oSize.w;
+        cellSize = cellSize * 2;
+
+
         var oBroker = Fusion.oBroker;
         var x = this.oCurrentPosition.x;
         var y = this.oCurrentPosition.y;



More information about the fusion-commits mailing list