[Mapbender-commits] r4806 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Oct 20 07:54:29 EDT 2009
Author: christoph
Date: 2009-10-20 07:54:29 -0400 (Tue, 20 Oct 2009)
New Revision: 4806
Modified:
trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php
Log:
added wfsConfId as 2nd parameter to wfssubfunctions
Modified: trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php 2009-10-20 11:52:57 UTC (rev 4805)
+++ trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php 2009-10-20 11:54:29 UTC (rev 4806)
@@ -118,7 +118,7 @@
}
else {
if (buttonWfs_toDigitize_on == 1) {
- mb_registerWfsReadSubFunctions(function(geom){
+ mb_registerWfsReadSubFunctions(function(geom, wfsConfId){
if (buttonWfs_toDigitize_target && window.frames[buttonWfs_toDigitize_target]) {
try {
tab_open(buttonWfs_toDigitize_target);
@@ -587,12 +587,12 @@
geom.get(i).wfs_conf = parseInt(js_wfs_conf_id);
}
}
- checkIfAllAjaxCallsFinished(geom);
+ checkIfAllAjaxCallsFinished(geom, db_wfs_conf_id);
}
);
}
-function checkIfAllAjaxCallsFinished (geom) {
+function checkIfAllAjaxCallsFinished (geom, wfsConfId) {
numberOfFinishedAjaxCalls++;
if (typeof(geom) == 'object'){
var mapIndex = getMapObjIndexByName(mod_wfs_spatialRequest_target);
@@ -609,7 +609,7 @@
}
if (numberOfFinishedAjaxCalls == numberOfAjaxCalls) {
numberOfFinishedAjaxCalls = 0;
- mb_execWfsReadSubFunctions(geomArray);
+ mb_execWfsReadSubFunctions(geomArray, wfsConfId);
}
}
@@ -657,7 +657,9 @@
function appendGeometryArrayToDigitize(geom){
var mapIndex = getMapObjIndexByName(mod_wfs_spatialRequest_target);
-
+ if (!geom || geom.count() === 0) {
+ return;
+ }
var proceed = true;
if (geom.get(0).getEpsg() !== mb_mapObj[mapIndex].epsg) {
var msg = "SRS mismatch. Geometry is in " + geom.get(0).getEpsg() +
More information about the Mapbender_commits
mailing list