[Mapbender-commits] r9522 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jun 13 06:37:33 PDT 2016


Author: armin11
Date: 2016-06-13 06:37:33 -0700 (Mon, 13 Jun 2016)
New Revision: 9522

Modified:
   trunk/mapbender/http/javascripts/map_obj.js
   trunk/mapbender/http/javascripts/mod_featureInfo.php
Log:
Further fix for deegree wms featureInfo handling

Modified: trunk/mapbender/http/javascripts/map_obj.js
===================================================================
--- trunk/mapbender/http/javascripts/map_obj.js	2016-06-13 07:39:27 UTC (rev 9521)
+++ trunk/mapbender/http/javascripts/map_obj.js	2016-06-13 13:37:33 UTC (rev 9522)
@@ -1011,7 +1011,7 @@
 							} else {
 								featureInfoObj.legendurl += "empty"+",";
 							}
-							if (typeof(this.wms[i].objLayer[j].layer_style[0]) !=='undefined') {
+							if (typeof(this.wms[i].objLayer[j].layer_style[0]) !=='undefined' && this.wms[i].objLayer[j].layer_style[0].name !== 'undefined') {
 								featureInfoObj.styles += this.wms[i].objLayer[j].layer_style[0].name+",";
 							} else {
 								featureInfoObj.styles += "default"+",";
@@ -1054,6 +1054,13 @@
 					if (typeof(featureInfoRequest) !== 'undefined' && featureInfoRequest !== "" && featureInfoRequest !== false) {
 						featureInfoRequest = changeURLParameterValue(featureInfoRequest,"LAYERS", this.wms[i].objLayer[j].layer_name);
 						featureInfoRequest = changeURLParameterValue(featureInfoRequest,"QUERY_LAYERS", this.wms[i].objLayer[j].layer_name);
+						if (typeof(this.wms[i].objLayer[j].layer_style[0]) !== 'undefined' && this.wms[i].objLayer[j].layer_style[0].name !== 'undefined') {
+							featureInfoObj.styles = this.wms[i].objLayer[j].layer_style[0].name;
+						} else {
+							featureInfoObj.styles = "default";
+						}
+					
+						featureInfoRequest = changeURLParameterValue(featureInfoRequest, "STYLES", featureInfoObj.styles);
 						featureInfoObj.request = featureInfoRequest;
 						var bbox = this.objectFindByKey(this.wms[i].objLayer[j].layer_epsg, "epsg", epsg);
 						if (bbox) {

Modified: trunk/mapbender/http/javascripts/mod_featureInfo.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_featureInfo.php	2016-06-13 07:39:27 UTC (rev 9521)
+++ trunk/mapbender/http/javascripts/mod_featureInfo.php	2016-06-13 13:37:33 UTC (rev 9522)
@@ -32,13 +32,13 @@
 if(typeof(featureInfoPopupPosition)==='undefined')
 	var featureInfoPopupPosition = 'center';
 var reverseInfo = typeof reverseInfo === "undefined" ? "false" : reverseInfo;
-if(typeof(featureInfoLayerPreselect)==='undefined')
+if(typeof(featureInfoLayerPreselect)==='undefined' || featureInfoLayerPreselect == 'false')
 	var featureInfoLayerPreselect = false;
 if(typeof(featureInfoDrawClick)==='undefined')
 	var featureInfoDrawClick = false;
 if(typeof(featureInfoCircleColor)==='undefined')
 	var featureInfoCircleColor = '#ff0000';
-if(typeof(featureInfoCollectLayers)==='undefined')
+if(typeof(featureInfoCollectLayers)==='undefined' || featureInfoCollectLayers == 'false')
 	var featureInfoCollectLayers = false;
 
 var mod_featureInfo_elName = "<?php echo $e_id;?>";



More information about the Mapbender_commits mailing list