[fusion-commits] r1587 - branches/fusion-1.1/MapGuide

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Oct 9 16:42:25 EDT 2008


Author: madair
Date: 2008-10-09 16:42:25 -0400 (Thu, 09 Oct 2008)
New Revision: 1587

Modified:
   branches/fusion-1.1/MapGuide/MapGuide.js
Log:
re #64: add a call to GETVISIBLEMAPEXTENTS for tiled maps whenever the extents change

Modified: branches/fusion-1.1/MapGuide/MapGuide.js
===================================================================
--- branches/fusion-1.1/MapGuide/MapGuide.js	2008-10-09 17:13:56 UTC (rev 1586)
+++ branches/fusion-1.1/MapGuide/MapGuide.js	2008-10-09 20:42:25 UTC (rev 1587)
@@ -282,6 +282,8 @@
               if (o.groups.length >0) {
                 this.bSingleTile = false;
                 this.groupName = o.groups[0].groupName  //assumes only one group for now
+                this.mapWidget.registerForEvent(Fusion.Event.MAP_EXTENTS_CHANGED, 
+                    OpenLayers.Function.bind(this.mapExtentsChanged, this));
               } else {
                 this.bSingleTile = true;
               }
@@ -988,6 +990,23 @@
         }
     },
     
+    //GETVISIBLEMAPEXTENT must be called for tiled maps whenever the extents 
+    //are changed so that tooltips will work properly
+    mapExtentsChanged: function() {
+      if (!this.singleTile) {
+          var center = this.mapWidget.oMapOL.getCenter(); 
+          var display = this.mapWidget.oMapOL.getSize(); 
+          var r = new Fusion.Lib.MGRequest.MGGetVisibleMapExtent(this.mapWidget.getSessionID(),
+                                                              this._sMapname,
+                                                              center.lon, center.lat,
+                                                              this.mapWidget.oMapOL.getScale(),
+                                                              null,
+                                                              this._nDpi,
+                                                              display.w, display.h);
+          Fusion.oBroker.dispatchRequest(r);
+      }
+    },
+    
     pingServer: function() {
         var s = this.arch + '/' + Fusion.getScriptLanguage() + "/Common." + Fusion.getScriptLanguage() ;
         var params = {};



More information about the fusion-commits mailing list