[fusion-commits] r1590 - in trunk: MapGuide templates/mapguide/standard widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Fri Oct 10 10:01:27 EDT 2008


Author: madair
Date: 2008-10-10 10:01:27 -0400 (Fri, 10 Oct 2008)
New Revision: 1590

Modified:
   trunk/MapGuide/MapGuide.js
   trunk/templates/mapguide/standard/index.html
   trunk/widgets/Navigator.js
Log:
closes #64: add a call to GETVISIBLEMAPEXTENTS for tiled maps whenever the extents change;
put Maptip widget in standard template;
fix navigator error


Modified: trunk/MapGuide/MapGuide.js
===================================================================
--- trunk/MapGuide/MapGuide.js	2008-10-10 13:59:47 UTC (rev 1589)
+++ trunk/MapGuide/MapGuide.js	2008-10-10 14:01:27 UTC (rev 1590)
@@ -288,6 +288,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;
               }
@@ -1074,6 +1076,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 = {};

Modified: trunk/templates/mapguide/standard/index.html
===================================================================
--- trunk/templates/mapguide/standard/index.html	2008-10-10 13:59:47 UTC (rev 1589)
+++ trunk/templates/mapguide/standard/index.html	2008-10-10 14:01:27 UTC (rev 1590)
@@ -69,7 +69,7 @@
         collapse: false, 
         maximize: true
     });
-    var pm = new Jx.PanelSet('PanelPane', [p1, p2, p3]);
+    var pm = new Jx.PanelSet({parent:'PanelPane', panels:[p1, p2, p3]});
     
     Fusion.registerForEvent(Fusion.Event.FUSION_INITIALIZED, function() {
         $('thePage').resize({forceResize: true});
@@ -98,6 +98,8 @@
 </div>
 <div id="Map"><div id="Navigator"></div></div>
 <div id="Statusbar"></div>
+<div id="Statusbar"></div>
+<div id="MapTip"></div>
 <div id="TaskPane"></div>
 <div id="PoweredBy" class="statusBarItem">
 <a href="http://mapserver.gis.umn.edu.org/" target="_blank">

Modified: trunk/widgets/Navigator.js
===================================================================
--- trunk/widgets/Navigator.js	2008-10-10 13:59:47 UTC (rev 1589)
+++ trunk/widgets/Navigator.js	2008-10-10 14:01:27 UTC (rev 1590)
@@ -231,7 +231,7 @@
             this.slider.set(position);
             this.bInternalChange = false;
         } else {
-            var res = olMap.baseLayer.resolutions;
+            var res = map.baseLayer.resolutions;
             var n = res.length;
             var max = res[0];
             var min = res[n-1];



More information about the fusion-commits mailing list