[Mapbender-commits] r6605 - trunk/mapbender/lib
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jul 19 08:30:46 EDT 2010
Author: kmq
Date: 2010-07-19 12:30:46 +0000 (Mon, 19 Jul 2010)
New Revision: 6605
Modified:
trunk/mapbender/lib/mb.ui.wfsGazetteer.js
Log:
fixed new WFSSearch to use AND instead of OR between fields
Modified: trunk/mapbender/lib/mb.ui.wfsGazetteer.js
===================================================================
--- trunk/mapbender/lib/mb.ui.wfsGazetteer.js 2010-07-15 17:17:47 UTC (rev 6604)
+++ trunk/mapbender/lib/mb.ui.wfsGazetteer.js 2010-07-19 12:30:46 UTC (rev 6605)
@@ -93,8 +93,8 @@
var ft = this.options.wfsConf.featuretype_name;
var id = "";
var OGCFilterExpression = "";
- var orConditions = [];
- var andConditions = [];
+ var propertyConditions = [];
+ var geometryConditions = [];
for(var i = 0; i < this.options.wfsConf.element.length; i++){
el = this.options.wfsConf.element[i];
id = $(this.element).attr('id') + "_" + el.element_name;
@@ -177,10 +177,10 @@
}
- orConditions.push(OGCFilterExpression);
+ propertyConditions.push(OGCFilterExpression);
}
- var OGCORFilter = orConditions.length == 1 ? orConditions[0] : "<Or>"+ orConditions.join('') +"</Or>";
- andConditions.push(OGCORFilter);
+ var OGCORFilter = propertyConditions.length == 1 ? propertyConditions[0] : "<And>"+ propertyConditions.join('') +"</And>";
+ geometryConditions.push(OGCORFilter);
@@ -233,10 +233,10 @@
OGCFilterExpression ="<Intersects>" + OGCFilterExpression +"</Intersects>";
break;
}
- andConditions.push(OGCFilterExpression);
+ geometryConditions.push(OGCFilterExpression);
}
- var OGCANDFilter = andConditions.length == 1 ? andConditions[0] : "<And>"+ andConditions.join('') +"</And>";
+ var OGCANDFilter = geometryConditions.length == 1 ? geometryConditions[0] : "<And>"+ geometryConditions.join('') +"</And>";
OGCFilter = "<ogc:Filter>" + OGCANDFilter +"</ogc:Filter>";
var params = {
More information about the Mapbender_commits
mailing list