[Mapbender-commits] r3637 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Mar 6 04:07:19 EST 2009
Author: verenadiewald
Date: 2009-03-06 04:07:18 -0500 (Fri, 06 Mar 2009)
New Revision: 3637
Modified:
trunk/mapbender/http/php/mod_WMSpreferences.php
Log:
changed function mb_swapWmsByIndex to get valid mapframe1
Modified: trunk/mapbender/http/php/mod_WMSpreferences.php
===================================================================
--- trunk/mapbender/http/php/mod_WMSpreferences.php 2009-03-06 09:05:48 UTC (rev 3636)
+++ trunk/mapbender/http/php/mod_WMSpreferences.php 2009-03-06 09:07:18 UTC (rev 3637)
@@ -106,20 +106,21 @@
var ind = window.opener.getMapObjIndexByName(mod_WMSpreferences_target1);
var my = window.opener.mb_mapObj[ind];
- function mb_swapWmsByIndex(mapObj_ind, indexA, indexB) {
- if (indexA != indexB && indexA >= 0 && indexA < mb_mapObj[mapObj_ind].wms.length && indexB >= 0 && indexB < mb_mapObj[mapObj_ind].wms.length) {
- upper = mb_mapObj[mapObj_ind].wms[indexA];
- mb_mapObj[mapObj_ind].wms[indexA] = mb_mapObj[mapObj_ind].wms[indexB];
- mb_mapObj[mapObj_ind].wms[indexB] = upper;
- var upperLayers = mb_mapObj[mapObj_ind].layers[indexA];
- var upperStyles = mb_mapObj[mapObj_ind].styles[indexA];
- var upperQuerylayers = mb_mapObj[mapObj_ind].querylayers[indexA];
- mb_mapObj[mapObj_ind].layers[indexA] = mb_mapObj[mapObj_ind].layers[indexB];
- mb_mapObj[mapObj_ind].styles[indexA] = mb_mapObj[mapObj_ind].styles[indexB];
- mb_mapObj[mapObj_ind].querylayers[indexA] = mb_mapObj[mapObj_ind].querylayers[indexB];
- mb_mapObj[mapObj_ind].layers[indexB] = upperLayers;
- mb_mapObj[mapObj_ind].styles[indexB] = upperStyles;
- mb_mapObj[mapObj_ind].querylayers[indexB] = upperQuerylayers;
+ function mb_swapWmsByIndex(mapObj_ind, indexA, indexB) {
+ var myMapObj = window.opener.mb_mapObj[mapObj_ind];
+ if (indexA != indexB && indexA >= 0 && indexA < myMapObj.wms.length && indexB >= 0 && indexB < myMapObj.wms.length) {
+ upper = myMapObj.wms[indexA];
+ myMapObj.wms[indexA] = myMapObj.wms[indexB];
+ myMapObj.wms[indexB] = upper;
+ var upperLayers = myMapObj.layers[indexA];
+ var upperStyles = myMapObj.styles[indexA];
+ var upperQuerylayers = myMapObj.querylayers[indexA];
+ myMapObj.layers[indexA] = myMapObj.layers[indexB];
+ myMapObj.styles[indexA] = myMapObj.styles[indexB];
+ myMapObj.querylayers[indexA] = myMapObj.querylayers[indexB];
+ myMapObj.layers[indexB] = upperLayers;
+ myMapObj.styles[indexB] = upperStyles;
+ myMapObj.querylayers[indexB] = upperQuerylayers;
return true;
}
else {
@@ -159,7 +160,7 @@
}
function swap(index1, index2){
- if (window.opener.mb_swapWmsByIndex(ind, index1, index2) == true) {
+ if (mb_swapWmsByIndex(ind, index1, index2) == true) {
loadWMS();
window.opener.zoom(mod_WMSpreferences_target1, true, 1.0);
window.opener.mb_execloadWmsSubFunctions();
More information about the Mapbender_commits
mailing list