svn commit: r703 - trunk/mapbender/http/classes/class_wmc.php
christoph at osgeo.org
christoph at osgeo.org
Thu Jul 27 04:18:52 EDT 2006
Author: christoph
Date: 2006-07-27 08:18:52+0000
New Revision: 703
Modified:
trunk/mapbender/http/classes/class_wmc.php
Log:
simplified epsg handling
Modified: trunk/mapbender/http/classes/class_wmc.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/classes/class_wmc.php?view=diff&rev=703&p1=trunk/mapbender/http/classes/class_wmc.php&p2=trunk/mapbender/http/classes/class_wmc.php&r1=702&r2=703
==============================================================================
--- trunk/mapbender/http/classes/class_wmc.php (original)
+++ trunk/mapbender/http/classes/class_wmc.php 2006-07-27 08:18:52+0000
@@ -604,7 +604,8 @@
$this->wmc_wms_serviceURL[$i] ."','" .
$this->wmc_layer_style_legendurl[$i][0] ."','','".
$this->wmc_layer_format[$i][0] ."','text/html','application/vnd.ogc.se_xml','".
- $this->wmc_layer_srs[$i][0] ."','1');\n";
+// $this->wmc_layer_srs[$i][0] ."','1');\n";
+ $this->wmc_bBox_SRS ."','1');\n";
$added_wms[count($added_wms)] = $current_wms;
$cnt_wms++;
@@ -614,6 +615,14 @@
$wmc_string .= "}\n";
}
+ $wmc_string .= $target . "wms_addSRS('".
+ $this->wmc_bBox_SRS ."','".
+ $this->wmc_bBox_minx ."','".
+ $this->wmc_bBox_miny ."','".
+ $this->wmc_bBox_maxx ."','".
+ $this->wmc_bBox_maxy ."','".
+ "');\n";
+
for ($ii = 0; $ii < count($this->wmc_layer_title); $ii++) {
$layer_wms = $this->wmc_wms_serviceURL[$ii];
if ($current_wms == $layer_wms) {
@@ -707,18 +716,19 @@
if ($layerlist == "") {$layerlist = $this->wmc_layer_name[$ii];} else {$layerlist .= "," . $this->wmc_layer_name[$ii];}
}
- for($j=0; $j<count($this->wmc_layer_srs[$ii]);$j++){
- if (!in_array($this->wmc_layer_srs[$ii][$j], $srs_array)) {
- $srs_array[count($srs_array)] = $this->wmc_layer_srs[$ii][$j];
- $wmc_string .= $target . "wms_addSRS('".
- $this->wmc_bBox_SRS ."','".
- $this->wmc_bBox_minx ."','".
- $this->wmc_bBox_miny ."','".
- $this->wmc_bBox_maxx ."','".
- $this->wmc_bBox_maxy ."','".
- "');\n";
- }
- }
+# for($j=0; $j<count($this->wmc_layer_srs[$ii]);$j++){
+# if (!in_array($this->wmc_layer_srs[$ii][$j], $srs_array)) {
+# $srs_array[count($srs_array)] = $this->wmc_layer_srs[$ii][$j];
+# $wmc_string .= $target . "wms_addSRS('".
+# $this->wmc_bBox_SRS ."','".
+# $this->wmc_bBox_minx ."','".
+# $this->wmc_bBox_miny ."','".
+# $this->wmc_bBox_maxx ."','".
+# $this->wmc_bBox_maxy ."','".
+# "');\n";
+# }
+# }
+
for($j=0; $j<count($this->wmc_layer_style_name[$ii]);$j++){
$wmc_string .= $target . "wms_addLayerStyle('".$this->wmc_layer_style_name[$ii][$j] ."','".$this->wmc_layer_style_title[$ii][$j] ."','".$j."','".$cnt_layers."', '" . $this->wmc_layer_style_legendurl[$ii][$j] . "', '" . $this->wmc_layer_style_legendurl_format[$ii][$j] . "');\n";
@@ -745,18 +755,22 @@
$wmc_string .= "for (var i=0; i<old_mapObj.length; i++) {\n";
$wmc_string .= "\tif (old_mapObj[i].frameName != 'overview') {\n";
$wmc_string .= "\t\t" . $target . "mb_registerMapObj(old_mapObj[i].frameName, old_mapObj[i].elementName, null, " . $this->wmc_windowWidth . ", " . $this->wmc_windowHeight . ");\n";
+# $wmc_string .= "alert(".$target . "mb_mapObj[i].extent);";
$wmc_string .= "\t\t" . $target . "document.getElementById(old_mapObj[i].frameName).style.width = " . $this->wmc_windowWidth . ";\n";
$wmc_string .= "\t\t" . $target . "document.getElementById(old_mapObj[i].frameName).style.height = " . $this->wmc_windowHeight . ";\n";
$wmc_string .= "\t}\n";
$wmc_string .= "\telse {\n";
- $wmc_string .= "\t\t" . $target . "mb_registerMapObj(old_mapObj[i].frameName, old_mapObj[i].elementName, 0, old_mapObj[i].width, old_mapObj[i].width);\n";
+ $wmc_string .= "\t\t" . $target . "mb_registerMapObj('overview', old_mapObj[i].elementName, 0, old_mapObj[i].width, old_mapObj[i].width);\n";
$wmc_string .= "\t}\n";
$wmc_string .= "}\n";
$wmc_string .= $target . "mb_execloadWmsSubFunctions();\n";
// $wmc_string .= $target . "setMapRequest('" . $mapObj . "');\n";
- $wmc_string .= $target . "mb_repaint('" . $mapObj . "', ";
+ $wmc_string .= "for (var i=0; i<old_mapObj.length; i++) {\n";
+ $wmc_string .= "\t" . $target . "mb_repaint(old_mapObj[i].frameName, ";
$wmc_string .= $this->wmc_bBox_minx .",".$this->wmc_bBox_miny .",";
$wmc_string .= $this->wmc_bBox_maxx .",".$this->wmc_bBox_maxy.");\n";
+ $wmc_string .= "}\n";
+
}
return $wmc_string;
}
More information about the Mapbender_commits
mailing list