[fusion-commits] r1252 - branches/fusion-1.0/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Mar 13 17:22:14 EDT 2008


Author: assefa
Date: 2008-03-13 17:22:14 -0400 (Thu, 13 Mar 2008)
New Revision: 1252

Modified:
   branches/fusion-1.0/widgets/Maptip.js
Log:
calculate cellsize for the query (#27)

Modified: branches/fusion-1.0/widgets/Maptip.js
===================================================================
--- branches/fusion-1.0/widgets/Maptip.js	2008-03-13 17:32:58 UTC (rev 1251)
+++ branches/fusion-1.0/widgets/Maptip.js	2008-03-13 21:22:14 UTC (rev 1252)
@@ -125,14 +125,19 @@
     },
     
     showMaptip: function(r) {
-      //console.log('showMaptip');
+    //console.log('showMaptip');
         var map = this.getMap();
         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;
+    //cellSize = 1e-6;
+
         var oBroker = Fusion.oBroker;
         var x = this.oCurrentPosition.x;
         var y = this.oCurrentPosition.y;



More information about the fusion-commits mailing list