[fusion-commits] r2736 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Jun 25 19:01:50 PDT 2013
Author: jng
Date: 2013-06-25 19:01:50 -0700 (Tue, 25 Jun 2013)
New Revision: 2736
Modified:
trunk/widgets/Maptip.js
Log:
Make the Maptip widget more flexible under multi-map configuration.
Modified: trunk/widgets/Maptip.js
===================================================================
--- trunk/widgets/Maptip.js 2013-06-06 14:25:17 UTC (rev 2735)
+++ trunk/widgets/Maptip.js 2013-06-26 02:01:50 UTC (rev 2736)
@@ -283,12 +283,33 @@
this.mouseIsDown = false;
},
+ _getMapTip: function(oMapTips) {
+ var iMgInstances = 0;
+ var mapWidget = this.getMap();
+ for (var i = mapWidget.aMaps.length - 1; i >= 0; i--) {
+ if (mapWidget.aMaps[i].arch == "MapGuide") {
+ iMgInstances++;
+ }
+ }
+ if (iMgInstances <= 1) {
+ this.getMapLayer().getMapTip(this);
+ } else {
+ var scale = mapWidget.getScale();
+ for (var i = mapWidget.aMaps.length - 1; i >= 0; i--) {
+ var mp = mapWidget.aMaps[i];
+ if (scale >= mp.minScale && scale <= mp.maxScale && mp.layerRoot.visible) {
+ mp.getMapTip(oMapTips);
+ }
+ }
+ }
+ },
+
showMaptip: function() {
if (this.bDigitizerActive === true) {
//console.log("Abort maptip query");
return;
}
- this.getMapLayer().getMapTip(this);
+ this._getMapTip(this);
this.mapTipFired = true;
},
More information about the fusion-commits
mailing list