[Mapbender-commits] r3249 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Nov 19 08:48:34 EST 2008
Author: christoph
Date: 2008-11-19 08:48:33 -0500 (Wed, 19 Nov 2008)
New Revision: 3249
Modified:
trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php
Log:
http://trac.osgeo.org/mapbender/ticket/329
Modified: trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php 2008-11-19 13:47:55 UTC (rev 3248)
+++ trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php 2008-11-19 13:48:33 UTC (rev 3249)
@@ -446,13 +446,37 @@
for(var ii=0; ii<mb_mapObj[ind].wms[i].objLayer.length; ii++){
var o = mb_mapObj[ind].wms[i].objLayer[ii];
if(o.gui_layer_wfs_featuretype != '' && o.gui_layer_querylayer == '1' && o.gui_layer_visible == '1'){
- db_wfs_conf_id[db_wfs_conf_id.length] = o.gui_layer_wfs_featuretype;
+ // db_wfs_conf_id entries have to be unique
+ var exists = false;
+ for (var iii = 0; iii < db_wfs_conf_id.length; iii++) {
+ if (db_wfs_conf_id[iii] == o.gui_layer_wfs_featuretype) {
+ exists = true;
+ break;
+ }
+ }
+ if (!exists) {
+ db_wfs_conf_id[db_wfs_conf_id.length] = o.gui_layer_wfs_featuretype;
+ }
}
}
}
for(var i=0; i<db_wfs_conf_id.length; i++){
- for(var ii=0; ii<wfs_config.length; ii++){
- if(wfs_config[ii]['wfs_conf_id'] == db_wfs_conf_id[i]) js_wfs_conf_id[js_wfs_conf_id.length] = ii;
+ for(var ii in wfs_config){
+ if(wfs_config[ii]['wfs_conf_id'] == db_wfs_conf_id[i]) {
+
+ // js_wfs_conf_id entries have to be unique
+ var exists = false;
+ for (var iii = 0; iii < js_wfs_conf_id.length; iii++) {
+ var n = js_wfs_conf_id[iii];
+ if (wfs_config[ii]['wfs_conf_id'] == wfs_config[n]['wfs_conf_id']) {
+ exists = true;
+ break;
+ }
+ }
+ if (!exists) {
+ js_wfs_conf_id[js_wfs_conf_id.length] = ii;
+ }
+ }
}
}
More information about the Mapbender_commits
mailing list