[Mapbender-commits] r3904 - in trunk/mapbender: core http/javascripts resources/db/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Apr 21 11:14:05 EDT 2009


Author: christoph
Date: 2009-04-21 11:14:04 -0400 (Tue, 21 Apr 2009)
New Revision: 3904

Modified:
   trunk/mapbender/core/system.php
   trunk/mapbender/http/javascripts/mod_featureInfo.php
   trunk/mapbender/resources/db/update/update_2.7.sql
Log:
http://trac.osgeo.org/mapbender/ticket/343

Modified: trunk/mapbender/core/system.php
===================================================================
--- trunk/mapbender/core/system.php	2009-04-21 15:11:02 UTC (rev 3903)
+++ trunk/mapbender/core/system.php	2009-04-21 15:14:04 UTC (rev 3904)
@@ -36,4 +36,4 @@
 
 define("ZOOM_MOUSEWHEEL", "1.1");
 
-define("MODULES_NOT_RELYING_ON_GLOBALS", "back,forward,zoomIn1,zoomOut1,selArea1,pan1,copyright,dependentDiv,dragMapSize,dynamicOverview,FeatureInfoRedirect,highlightPOI,navFrame,sandclock,scaleBar,scaleSel,setBBOX,setPOI2Scale");
+define("MODULES_NOT_RELYING_ON_GLOBALS", "featureInfo1,gazetteerWFS,back,forward,zoomIn1,zoomOut1,selArea1,pan1,copyright,dependentDiv,dragMapSize,dynamicOverview,FeatureInfoRedirect,highlightPOI,navFrame,sandclock,scaleBar,scaleSel,setBBOX,setPOI2Scale");

Modified: trunk/mapbender/http/javascripts/mod_featureInfo.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_featureInfo.php	2009-04-21 15:11:02 UTC (rev 3903)
+++ trunk/mapbender/http/javascripts/mod_featureInfo.php	2009-04-21 15:14:04 UTC (rev 3904)
@@ -21,6 +21,14 @@
 include '../include/dyn_js.php';
 //defaults for element vars
 ?>
+try {
+	if (ignoreWms) {
+	}
+}
+catch (e) {
+	ignoreWms = [];
+}
+
 if(typeof(featureInfoLayerPopup)==='undefined')
 	var featureInfoLayerPopup = 'false';
 if(typeof(featureInfoPopupHeight)==='undefined')
@@ -28,7 +36,7 @@
 if(typeof(featureInfoPopupWidth)==='undefined')
 	var featureInfoPopupWidth = '270';
 
-var mod_featureInfo_elName = "featureInfo1";
+var mod_featureInfo_elName = "<?php echo $e_id;?>";
 var mod_featureInfo_frameName = "";
 var mod_featureInfo_target = "<?php echo $e_target[0]; ?>";
 var mod_featureInfo_mapObj = null;
@@ -37,19 +45,25 @@
 var mod_featureInfo_img_off = new Image(); mod_featureInfo_img_off.src ="<?php  echo $e_src;  ?>";
 var mod_featureInfo_img_over = new Image(); mod_featureInfo_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
 
-function init_featureInfo1(ind){
-	mod_featureInfo_mapObj = getMapObjByName(mod_featureInfo_target);
+eventInit.register(function () {
+	mb_regButton(function init_featureInfo1(ind){
+		mod_featureInfo_mapObj = getMapObjByName(mod_featureInfo_target);
 	
-	mb_button[ind] = document.getElementById(mod_featureInfo_elName);
-	mb_button[ind].img_over = mod_featureInfo_img_over.src;
-	mb_button[ind].img_on = mod_featureInfo_img_on.src;
-	mb_button[ind].img_off = mod_featureInfo_img_off.src;
-	mb_button[ind].status = 0;
-	mb_button[ind].elName = mod_featureInfo_elName;
-	mb_button[ind].fName = mod_featureInfo_frameName;
-	mb_button[ind].go = new Function ("mod_featureInfo_click()");
-	mb_button[ind].stop = new Function ("mod_featureInfo_disable()");
-}
+		mb_button[ind] = document.getElementById(mod_featureInfo_elName);
+		mb_button[ind].img_over = mod_featureInfo_img_over.src;
+		mb_button[ind].img_on = mod_featureInfo_img_on.src;
+		mb_button[ind].img_off = mod_featureInfo_img_off.src;
+		mb_button[ind].status = 0;
+		mb_button[ind].elName = mod_featureInfo_elName;
+		mb_button[ind].fName = mod_featureInfo_frameName;
+		mb_button[ind].go = function () {
+			mod_featureInfo_click();
+		};
+		mb_button[ind].stop = function () {
+			mod_featureInfo_disable();
+		};
+	});
+});
 function mod_featureInfo_click(){   
 	mod_featureInfo_mapObj.getDomElement().onclick = mod_featureInfo_event;
 }
@@ -71,7 +85,7 @@
 		}
 	}
 	else{
-		urls = mod_featureInfo_mapObj.getFeatureInfoRequests(point);
+		urls = mod_featureInfo_mapObj.getFeatureInfoRequests(point, ignoreWms);
 		if(urls){
 			for(var i=0;i<urls.length;i++){
 				if(featureInfoLayerPopup == 'true'){

Modified: trunk/mapbender/resources/db/update/update_2.7.sql
===================================================================
--- trunk/mapbender/resources/db/update/update_2.7.sql	2009-04-21 15:11:02 UTC (rev 3903)
+++ trunk/mapbender/resources/db/update/update_2.7.sql	2009-04-21 15:14:04 UTC (rev 3904)
@@ -1,6 +1,7 @@
 -- remove event handlers, are now in the script
 UPDATE gui_element SET e_attributes = '' WHERE e_id = 'selArea1';
 UPDATE gui_element SET e_attributes = '' WHERE e_id = 'pan1';
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'featureInfo1';
 UPDATE gui_element SET e_content = '' WHERE e_id = 'navFrame';
 
 



More information about the Mapbender_commits mailing list