[Mapbender-commits] r4874 - branches/2.6/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Oct 28 09:45:20 EDT 2009


Author: verenadiewald
Date: 2009-10-28 09:45:19 -0400 (Wed, 28 Oct 2009)
New Revision: 4874

Modified:
   branches/2.6/http/javascripts/mod_featureInfo.php
   branches/2.6/http/javascripts/wms.js
Log:
http://trac.osgeo.org/mapbender/ticket/529

Modified: branches/2.6/http/javascripts/mod_featureInfo.php
===================================================================
--- branches/2.6/http/javascripts/mod_featureInfo.php	2009-10-28 13:44:30 UTC (rev 4873)
+++ branches/2.6/http/javascripts/mod_featureInfo.php	2009-10-28 13:45:19 UTC (rev 4874)
@@ -76,7 +76,7 @@
 			for(var i=0;i<urls.length;i++){
 				if(featureInfoLayerPopup == 'true'){
 					var p = new mb_popup({
-						title:<?php echo _mb("Informations");?>,
+						title:<?php echo _mb("Information");?>,  
 						url:urls[i],
 						width:parseInt(featureInfoPopupWidth, 10),
 						height:parseInt(featureInfoPopupHeight, 10),

Modified: branches/2.6/http/javascripts/wms.js
===================================================================
--- branches/2.6/http/javascripts/wms.js	2009-10-28 13:44:30 UTC (rev 4873)
+++ branches/2.6/http/javascripts/wms.js	2009-10-28 13:45:19 UTC (rev 4874)
@@ -420,10 +420,14 @@
  * @return array of layernames
  * @type string[]
  */
-wms_const.prototype.getQuerylayers = function(){
+wms_const.prototype.getQuerylayers = function(map){
+	var currentScale = map.getScale();
 	queryLayers = [];
 	for(var i=0; i< this.objLayer.length; i++){
-		if(this.objLayer[i].gui_layer_querylayer === 1 && ! this.objLayer[i].has_childs ){
+		var isVisible = this.objLayer[i].gui_layer_minscale <= currentScale &&
+				(this.objLayer[i].gui_layer_maxscale >= currentScale ||
+				this.objLayer[i].gui_layer_maxscale === 0);
+		if(this.objLayer[i].gui_layer_querylayer === 1 && !this.objLayer[i].has_childs && isVisible){
 			queryLayers.push(this.objLayer[i].layer_name);
 		}
 	}



More information about the Mapbender_commits mailing list