[Mapbender-commits] r3705 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Mar 13 09:34:54 EDT 2009
Author: christoph
Date: 2009-03-13 09:34:53 -0400 (Fri, 13 Mar 2009)
New Revision: 3705
Modified:
trunk/mapbender/http/classes/class_map.php
trunk/mapbender/http/classes/class_wmc.php
Log:
http://trac.osgeo.org/mapbender/ticket/392
Modified: trunk/mapbender/http/classes/class_map.php
===================================================================
--- trunk/mapbender/http/classes/class_map.php 2009-03-13 13:11:10 UTC (rev 3704)
+++ trunk/mapbender/http/classes/class_map.php 2009-03-13 13:34:53 UTC (rev 3705)
@@ -9,7 +9,7 @@
private $width;
private $height;
private $frameName;
- private $elementName = "maps";
+ private $elementName;
private $extent;
private $zoomFullExtentArray = array();
private $isOverview = false;
@@ -260,7 +260,8 @@
$this->width = $jsMapObject->width;
$this->height = $jsMapObject->height;
- $this->frameName = $jsMapObject->frameName;
+ // there are no more map frames in Mapbender 2.6
+ $this->frameName = $jsMapObject->elementName;
$this->extent = $bbox;
if (isset($jsMapObject->isOverview) && $jsMapObject->isOverview == "1") {
@@ -400,9 +401,10 @@
if ($wmsIndex === null) {
$wmsIndex = "null";
}
- $registerMapString = "mb_registerMapObj('" .
- $this->frameName . "', " .
- "'maps', " .
+
+ // syntax has changed in 2.6! Map is no longer a frame
+ $registerMapString = "mb_registerMapObj('', " .
+ "'" . $this->frameName . "', " .
$wmsIndex . ", " .
$this->width . ", " .
$this->height . ");";
Modified: trunk/mapbender/http/classes/class_wmc.php
===================================================================
--- trunk/mapbender/http/classes/class_wmc.php 2009-03-13 13:11:10 UTC (rev 3704)
+++ trunk/mapbender/http/classes/class_wmc.php 2009-03-13 13:34:53 UTC (rev 3705)
@@ -502,7 +502,7 @@
$tagLowerCase = administration::sepNameSpace($element[tag]);
$type = $element[type];
$attributes = $element[attributes];
- $value = mb_utf8_decode(html_entity_decode($element[value])); // TODO: not sure if utf decoding is necessary
+ $value = mb_utf8_decode(html_entity_decode($element[value]));
if ($tag == "VIEWCONTEXT" && $type == "open") {
$this->wmc_id = $attributes["id"];
@@ -915,6 +915,11 @@
$currentMapIsOverview = true;
}
+ if (is_null($currentMap)) {
+ $e = new mb_exception('class_wmc.php: setLayerData: $currentMap is null. Aborting.');
+ return null;
+ }
+
$wmsArray = $currentMap->getWmsArray();
//
More information about the Mapbender_commits
mailing list