[Mapbender-commits] r3714 - in trunk/mapbender: conf
http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Sat Mar 14 05:05:23 EDT 2009
Author: christoph
Date: 2009-03-14 05:05:23 -0400 (Sat, 14 Mar 2009)
New Revision: 3714
Modified:
trunk/mapbender/conf/wfs_default.conf
trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php
Log:
make srs warning and confirmation configurable
Modified: trunk/mapbender/conf/wfs_default.conf
===================================================================
--- trunk/mapbender/conf/wfs_default.conf 2009-03-14 08:56:26 UTC (rev 3713)
+++ trunk/mapbender/conf/wfs_default.conf 2009-03-14 09:05:23 UTC (rev 3714)
@@ -37,6 +37,12 @@
var searchPopupX = 800;
var searchPopupY = 100;
+// if feature found via wfs request do not match
+// the current client SRS, a warning with a
+// confirmation prompt is displayed. Useful
+// in applications with switchEPSG
+var displaySrsWarning = false;
+
var detailPopupTitle = "Details";
var detailPopupWidth = 300;
var detailPopupHeight = 250;
Modified: trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php 2009-03-14 08:56:26 UTC (rev 3713)
+++ trunk/mapbender/http/javascripts/mod_wfs_SpatialRequest.php 2009-03-14 09:05:23 UTC (rev 3714)
@@ -105,6 +105,12 @@
catch(e){
buttonWfs_toDigitize_on = 0;
}
+try{
+ if (displaySrsWarning){}
+}
+catch(e){
+ displaySrsWarning = false;
+}
if (wfsResultToPopupDiv == 1) {
mb_registerWfsReadSubFunctions(function (geom) {
displayPopup(geom);
@@ -630,7 +636,9 @@
var msg = "SRS mismatch. Geometry is in " + geom.get(0).getEpsg() +
", map is in " + mb_mapObj[mapIndex].epsg + ".";
var e = new Mb_warning(msg);
- proceed = confirm(msg + " Proceed?");
+ if (displaySrsWarning) {
+ proceed = confirm(msg + " Proceed?");
+ }
}
if (!proceed) {
return;
@@ -652,7 +660,9 @@
var msg = "SRS mismatch. Geometry is in " + geom.get(0).getEpsg() +
", map is in " + mb_mapObj[mapIndex].epsg + ".";
var e = new Mb_warning(msg);
- proceed = confirm(msg + " Proceed?");
+ if (displaySrsWarning) {
+ proceed = confirm(msg + " Proceed?");
+ }
}
if (!proceed) {
return;
More information about the Mapbender_commits
mailing list