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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Dec 14 09:26:47 EST 2010


Author: christoph
Date: 2010-12-14 06:26:46 -0800 (Tue, 14 Dec 2010)
New Revision: 7309

Modified:
   trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php
Log:
WFS response size limit

Modified: trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php	2010-12-14 11:34:46 UTC (rev 7308)
+++ trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php	2010-12-14 14:26:46 UTC (rev 7309)
@@ -267,12 +267,12 @@
 
 var mapbenderInit = function () {
 	try {
-		parent.Mapbender.modules.gazetteerWFS.receiveFeatureCollection = new parent.Mapbender.Event();
-		parent.Mapbender.modules.gazetteerWFS.events = {
+		parent.Mapbender.modules[frameName].receiveFeatureCollection = new parent.Mapbender.Event();
+		parent.Mapbender.modules[frameName].events = {
 			gazetteerReady: new parent.Mapbender.Event()
 		};
-		var ev = parent.Mapbender.modules.gazetteerWFS.events;
-		ev.receiveFeatureCollection = parent.Mapbender.modules.gazetteerWFS.receiveFeatureCollection;
+		var ev = parent.Mapbender.modules[frameName].events;
+		ev.receiveFeatureCollection = parent.Mapbender.modules[frameName].receiveFeatureCollection;
 
 		/**
 		 * Property: events.onWfsConfSelect
@@ -750,13 +750,13 @@
 
 	    	appendStyles();
 			appendWfsForm();
-			parent.Mapbender.modules.gazetteerWFS.events.onWfsConfSelect.trigger({
+			parent.Mapbender.modules[frameName].events.onWfsConfSelect.trigger({
 				wfsConfId: global_selectedWfsConfId
 			});
 		};
 	}
 	else{
-	   selectNode.setAttribute("onchange", "parent.$('.resultList').dialog('close');parent.$('.infoPopup').dialog('close');global_selectedWfsConfId = this.value;initializeOnLoad=0;appendStyles();appendWfsForm();parent.Mapbender.modules.gazetteerWFS.events.onWfsConfSelect.trigger({wfsConfId: global_selectedWfsConfId});");
+	   selectNode.setAttribute("onchange", "parent.$('.resultList').dialog('close');parent.$('.infoPopup').dialog('close');global_selectedWfsConfId = this.value;initializeOnLoad=0;appendStyles();appendWfsForm();parent.Mapbender.modules[frameName].events.onWfsConfSelect.trigger({wfsConfId: global_selectedWfsConfId});");
 	}
 	var isSelected = false;
 	for (var wfsConfId in global_wfsConfObj) {
@@ -901,7 +901,7 @@
 }
 
 function clearFilter(){
-	parent.Mapbender.modules.gazetteerWFS.events.onFormReset.trigger({
+	parent.Mapbender.modules[frameName].events.onFormReset.trigger({
 		wfsConfId: global_selectedWfsConfId
 	});
 	var wfsConfElementArray = global_wfsConfObj[global_selectedWfsConfId].element;
@@ -989,7 +989,7 @@
 }
 function validate(){
 
-	parent.Mapbender.modules.gazetteerWFS.events.onWfsConfSelect.trigger({
+	parent.Mapbender.modules[frameName].events.onWfsConfSelect.trigger({
 		wfsConfId: global_selectedWfsConfId
 	});
 	if(geomArray.count()>0){
@@ -1314,9 +1314,14 @@
 						}
 					}
 					try {
-						if(typeof(jsCode) == 'object'){
+						if(typeof(jsCode) == 'string'){
+							alert(jsCode);
+							return false;
+						}
+						else if(typeof(jsCode) == 'object'){
 							var geoObj = jsCode;
-						}else{
+						}
+						else{
 							var geoObj = parent.$.parseJSON(jsCode);
 						}
 					}
@@ -1334,7 +1339,7 @@
 			        		geomArray.importGeoJSON(geoObj);
 			        		document.getElementById("res").innerHTML = '';
 
-							parent.Mapbender.modules.gazetteerWFS.receiveFeatureCollection.trigger(geoObj);
+							parent.Mapbender.modules[frameName].receiveFeatureCollection.trigger(geoObj);
 
 							var resultList = parent.Mapbender.modules.resultList;
 							resultList.clear();
@@ -1345,7 +1350,7 @@
 						}
 						else {
 							document.getElementById("res").innerHTML = '';
-							parent.Mapbender.modules.gazetteerWFS.receiveFeatureCollection.trigger(null);
+							parent.Mapbender.modules[frameName].receiveFeatureCollection.trigger(null);
 						}
 					}
 		       		else {



More information about the Mapbender_commits mailing list