[Mapbender-commits] r2621 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jul 8 12:10:34 EDT 2008
Author: christoph
Date: 2008-07-08 12:10:34 -0400 (Tue, 08 Jul 2008)
New Revision: 2621
Modified:
trunk/mapbender/http/classes/class_bbox.php
trunk/mapbender/http/classes/class_element.php
trunk/mapbender/http/classes/class_locale.php
trunk/mapbender/http/classes/class_map.php
trunk/mapbender/http/classes/class_point.php
Log:
debug
Modified: trunk/mapbender/http/classes/class_bbox.php
===================================================================
--- trunk/mapbender/http/classes/class_bbox.php 2008-07-08 15:52:14 UTC (rev 2620)
+++ trunk/mapbender/http/classes/class_bbox.php 2008-07-08 16:10:34 UTC (rev 2621)
@@ -19,6 +19,7 @@
require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+require_once(dirname(__FILE__)."/../classes/class_point.php");
$con = db_connect(DBSERVER,OWNER,PW);
db_select_db(DB,$con);
@@ -146,6 +147,10 @@
return false;
}
+ function toHtml () {
+ return (string) $this->min->toHtml() . " | " . $this->max->toHtml();
+ }
+
function __toString() {
return (string) "[" . $this->min . $this->max . " " . $this->epsg . "]";
}
Modified: trunk/mapbender/http/classes/class_element.php
===================================================================
--- trunk/mapbender/http/classes/class_element.php 2008-07-08 15:52:14 UTC (rev 2620)
+++ trunk/mapbender/http/classes/class_element.php 2008-07-08 16:10:34 UTC (rev 2621)
@@ -17,16 +17,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-session_start();
+require_once(dirname(__FILE__)."/../../core/globalSettings.php");
define("ELEMENT_PATTERN", "/sessionID/");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
-
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
class Element {
var $guiId;
Modified: trunk/mapbender/http/classes/class_locale.php
===================================================================
--- trunk/mapbender/http/classes/class_locale.php 2008-07-08 15:52:14 UTC (rev 2620)
+++ trunk/mapbender/http/classes/class_locale.php 2008-07-08 16:10:34 UTC (rev 2621)
@@ -107,7 +107,7 @@
$_SESSION["mb_locale"] = $this->name;
$e = new Mb_notice("locale " . $this->name . " ok on " . $this->os);
// from http://de3.php.net/manual/de/function.gettext.php
- bindtextdomain("Mapbender", dirname(__FILE__)."/../resources/locale/");
+ bindtextdomain("Mapbender", dirname(__FILE__)."/../../resources/locale/");
textdomain("Mapbender");
return true;
}
Modified: trunk/mapbender/http/classes/class_map.php
===================================================================
--- trunk/mapbender/http/classes/class_map.php 2008-07-08 15:52:14 UTC (rev 2620)
+++ trunk/mapbender/http/classes/class_map.php 2008-07-08 16:10:34 UTC (rev 2621)
@@ -166,6 +166,25 @@
$this->wmsArray = wms::merge(array_merge($anotherMap->getWmsArray(), $this->wmsArray));
}
+ /**
+ * Adds WMS to this map
+ *
+ * @return
+ */
+ public function appendWmsArray ($wmsArray) {
+ $this->wmsArray = array_merge($this->wmsArray, $wmsArray);
+ }
+
+ /**
+ * Merge WMS into this map
+ *
+ * @return
+ */
+ public function mergeWmsArray ($wmsArray) {
+ $this->wmsArray = wms::merge(array_merge($this->wmsArray, $wmsArray));
+ }
+
+
// ------------------------------------------------------------------------
// Instantiation
// ------------------------------------------------------------------------
@@ -190,7 +209,6 @@
if (isset($jsMapObject->isOverview) && $jsMapObject->isOverview == "1") {
$this->isOverview = true;
- $e = new mb_notice("ov: " . $this->isOverview);
}
for ($i=0; $i < count($jsMapObject->wms); $i++){
@@ -268,7 +286,7 @@
$newLayer->layer_epsg[$z]["maxx"] = $currentLayer->layer_epsg[$z]->maxx;
$newLayer->layer_epsg[$z]["maxy"] = $currentLayer->layer_epsg[$z]->maxy;
}
-
+
// BEWARE THIS IS SUPER UGLY CODE
$newLayer->layer_style = array();
for ($z = 0; $z < count($currentLayer->layer_style); $z++) {
@@ -324,7 +342,7 @@
$this->height . ");";
array_push($jsCodeArray, $registerMapString);
- $e = new mb_notice("Map to JS: ov? " . $this->isOverview);
+// $e = new mb_notice("Map to JS: ov? " . $this->isOverview);
// if map is overview...
if ($this->isOverview) {
Modified: trunk/mapbender/http/classes/class_point.php
===================================================================
--- trunk/mapbender/http/classes/class_point.php 2008-07-08 15:52:14 UTC (rev 2620)
+++ trunk/mapbender/http/classes/class_point.php 2008-07-08 16:10:34 UTC (rev 2621)
@@ -151,6 +151,26 @@
}
}
+ function toHtml () {
+ $str = "";
+
+ $xArray = explode(".", strval($this->x));
+ $str .= $xArray[0] . "°";
+ if ($xArray[1]) {
+ $str .= $xArray[1] . "'";
+ }
+ $str .= " O / ";
+
+ $yArray = explode(".", strval($this->y));
+ $str .= $yArray[0] . "°";
+ if ($yArray[1]) {
+ $str .= $yArray[1] . "'";
+ }
+ $str .= " N";
+ return $str;
+
+ }
+
function __toString() {
return (string) "(" . $this->x . "," . $this->y . "," . $this->epsg . ")";
}
More information about the Mapbender_commits
mailing list