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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Aug 9 05:11:26 EDT 2007


Author: christoph
Date: 2007-08-09 05:11:26 -0400 (Thu, 09 Aug 2007)
New Revision: 1645

Modified:
   trunk/mapbender/http/javascripts/map.js
Log:
moved register functions up

Modified: trunk/mapbender/http/javascripts/map.js
===================================================================
--- trunk/mapbender/http/javascripts/map.js	2007-08-09 09:10:35 UTC (rev 1644)
+++ trunk/mapbender/http/javascripts/map.js	2007-08-09 09:11:26 UTC (rev 1645)
@@ -20,6 +20,91 @@
 var mb_offset_left = 0;
 var mb_log = null;
 
+
+/*
+ ***************************************************************************************
+ *   register functions
+ ***************************************************************************************
+ */
+
+var mb_MapRequestSubFunctions = [];
+var mb_WfsReadSubFunctions = [];
+var mb_WfsWriteSubFunctions = [];
+var mb_MapRequestPreFunctions = [];
+var mb_FeatureInfoPreFunctions = [];
+var mb_InitFunctions = [];
+var mb_MapObjectSubFunctions = [];
+var mb_GetScalePreFunctions = [];
+var mb_loadWmsSubFunctions = [];
+var mb_l10nFunctions = [];
+
+function mb_registerInitFunctions(stringFunction){
+	mb_InitFunctions[mb_InitFunctions.length] = stringFunction;
+}
+function mb_registerPreFunctions(stringFunction){
+	mb_MapRequestPreFunctions[mb_MapRequestPreFunctions.length] = stringFunction;
+}
+function mb_registerFeatureInfoPreFunctions(stringFunction){
+	mb_FeatureInfoPreFunctions[mb_FeatureInfoPreFunctions.length] = stringFunction;
+}
+function mb_registerSubFunctions(stringFunction){
+	mb_MapRequestSubFunctions[mb_MapRequestSubFunctions.length] = stringFunction;
+}
+function mb_registerMapObjectSubFunctions(stringFunction){
+	mb_MapObjectSubFunctions[mb_MapObjectSubFunctions.length] = stringFunction;
+}
+function mb_registerGetScalePreFunctions(stringFunction){
+	mb_GetScalePreFunctions[mb_GetScalePreFunctions.length] = stringFunction;
+}
+function mb_registerloadWmsSubFunctions(stringFunction){
+	mb_loadWmsSubFunctions[mb_loadWmsSubFunctions.length] = stringFunction;
+}
+function mb_registerWfsReadSubFunctions(stringFunction){
+	mb_WfsReadSubFunctions[mb_WfsReadSubFunctions.length] = stringFunction;
+}
+function mb_registerWfsWriteSubFunctions(stringFunction){
+	mb_WfsWriteSubFunctions[mb_WfsWriteSubFunctions.length] = stringFunction;
+}
+function mb_registerL10nFunctions(stringFunction) {
+	mb_l10nFunctions[mb_l10nFunctions.length] = stringFunction;
+}
+function mb_removeFunctionFromArray(arrayname,stringFunction){
+	var length = eval(arrayname+".length");
+	for(var i=0; i<length; i++){
+		if(eval(arrayname+"["+i+"]") == stringFunction){
+			var newArray1 = eval(arrayname+".slice(0, "+(i-1)+")");
+			var newArray2 = eval(arrayname+".slice("+(i+1)+", "+length+")");
+			eval(arrayname + " = newArray1.concat(newArray2)");
+			i--;
+			length--;
+		}
+	}
+}
+
+
+function localize() {
+	for(var i=0; i<mb_l10nFunctions.length; i++){
+		eval(mb_l10nFunctions[i]); 	 
+	} 	 
+}
+function mb_execloadWmsSubFunctions(){
+	for(var i=0; i<mb_loadWmsSubFunctions.length; i++){
+		eval(mb_loadWmsSubFunctions[i]); 	 
+	} 	 
+}
+
+function mb_execWfsReadSubFunctions(geom) { 	 
+	for(var i=0; i<mb_WfsReadSubFunctions.length; i++){ 	 
+		mb_WfsReadSubFunctions[i](geom); 	 
+	} 	 
+}
+
+function mb_execWfsWriteSubFunctions() { 	 
+	for(var i=0; i<mb_WfsWriteSubFunctions.length; i++){
+		mb_WfsWriteSubFunctions[i](); 	 
+	} 	 
+}
+
 var mb_PanSubElements = [];
 function mb_registerPanSubElement(elName){
 	var ind = mb_PanSubElements.length;
@@ -1489,11 +1574,11 @@
    }
 }
 function updateButtonTooltips(obj) {
-	console.log("begin tooltip update");
+//	console.log("begin tooltip update");
 	for(var i=0; i<mb_button.length; i++){
-		console.log("button %i", i);
+//		console.log("button %i", i);
 		for(var j=0; j<obj.length; j++){
-			console.log("%s %s", mb_button[i].elName, obj[j].id);
+//			console.log("%s %s", mb_button[i].elName, obj[j].id);
 			if (mb_button[i].elName == obj[j].id) {
 				if (mb_button[i].frameName != "") {
 					window.frames[mb_button[i].frameName].document.getElementById(mb_button[i].elName).title = obj[j].title;
@@ -1644,90 +1729,6 @@
 
 
 /*
- ***************************************************************************************
- *   register functions
- ***************************************************************************************
- */
-
-var mb_MapRequestSubFunctions = [];
-var mb_WfsReadSubFunctions = [];
-var mb_WfsWriteSubFunctions = [];
-var mb_MapRequestPreFunctions = [];
-var mb_FeatureInfoPreFunctions = [];
-var mb_InitFunctions = [];
-var mb_MapObjectSubFunctions = [];
-var mb_GetScalePreFunctions = [];
-var mb_loadWmsSubFunctions = [];
-var mb_l10nFunctions = [];
-
-function mb_registerInitFunctions(stringFunction){
-	mb_InitFunctions[mb_InitFunctions.length] = stringFunction;
-}
-function mb_registerPreFunctions(stringFunction){
-	mb_MapRequestPreFunctions[mb_MapRequestPreFunctions.length] = stringFunction;
-}
-function mb_registerFeatureInfoPreFunctions(stringFunction){
-	mb_FeatureInfoPreFunctions[mb_FeatureInfoPreFunctions.length] = stringFunction;
-}
-function mb_registerSubFunctions(stringFunction){
-	mb_MapRequestSubFunctions[mb_MapRequestSubFunctions.length] = stringFunction;
-}
-function mb_registerMapObjectSubFunctions(stringFunction){
-	mb_MapObjectSubFunctions[mb_MapObjectSubFunctions.length] = stringFunction;
-}
-function mb_registerGetScalePreFunctions(stringFunction){
-	mb_GetScalePreFunctions[mb_GetScalePreFunctions.length] = stringFunction;
-}
-function mb_registerloadWmsSubFunctions(stringFunction){
-	mb_loadWmsSubFunctions[mb_loadWmsSubFunctions.length] = stringFunction;
-}
-function mb_registerWfsReadSubFunctions(stringFunction){
-	mb_WfsReadSubFunctions[mb_WfsReadSubFunctions.length] = stringFunction;
-}
-function mb_registerWfsWriteSubFunctions(stringFunction){
-	mb_WfsWriteSubFunctions[mb_WfsWriteSubFunctions.length] = stringFunction;
-}
-function mb_registerL10nFunctions(stringFunction) {
-	mb_l10nFunctions[mb_l10nFunctions.length] = stringFunction;
-}
-function mb_removeFunctionFromArray(arrayname,stringFunction){
-	var length = eval(arrayname+".length");
-	for(var i=0; i<length; i++){
-		if(eval(arrayname+"["+i+"]") == stringFunction){
-			var newArray1 = eval(arrayname+".slice(0, "+(i-1)+")");
-			var newArray2 = eval(arrayname+".slice("+(i+1)+", "+length+")");
-			eval(arrayname + " = newArray1.concat(newArray2)");
-			i--;
-			length--;
-		}
-	}
-}
-
-
-function localize() {
-	for(var i=0; i<mb_l10nFunctions.length; i++){
-		eval(mb_l10nFunctions[i]); 	 
-	} 	 
-}
-function mb_execloadWmsSubFunctions(){
-	for(var i=0; i<mb_loadWmsSubFunctions.length; i++){
-		eval(mb_loadWmsSubFunctions[i]); 	 
-	} 	 
-}
-
-function mb_execWfsReadSubFunctions(geom) { 	 
-	for(var i=0; i<mb_WfsReadSubFunctions.length; i++){ 	 
-		mb_WfsReadSubFunctions[i](geom); 	 
-	} 	 
-}
-
-function mb_execWfsWriteSubFunctions() { 	 
-	for(var i=0; i<mb_WfsWriteSubFunctions.length; i++){
-		mb_WfsWriteSubFunctions[i](); 	 
-	} 	 
-}
-
-/*
  * first draft of a redesign
  *
 var FunctionArray = function() {



More information about the Mapbender_commits mailing list