[Mapbender-commits] r2444 - branches/beck_dev/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu May 8 06:38:01 EDT 2008


Author: beck
Date: 2008-05-08 06:38:00 -0400 (Thu, 08 May 2008)
New Revision: 2444

Added:
   branches/beck_dev/mapbender/http/classes/class.map2object.php
Log:


Added: branches/beck_dev/mapbender/http/classes/class.map2object.php
===================================================================
--- branches/beck_dev/mapbender/http/classes/class.map2object.php	                        (rev 0)
+++ branches/beck_dev/mapbender/http/classes/class.map2object.php	2008-05-08 10:38:00 UTC (rev 2444)
@@ -0,0 +1,98 @@
+<?php
+ini_set("display_errors","on");
+
+/**
+ * @class
+ */
+
+class map2object {
+
+	var $foo;
+
+	var $mapbenderFrameName;
+	var $mapbenderElement;
+
+	var $mapURL;
+	var $mapSRS;
+	var $mapWidth;
+	var $mapHeight;
+	var $mapExtent;
+	var $mapVisibleLayers;
+
+	/**
+	 * @constructor
+	 * @param
+	 */
+	
+	function __construct() {
+		$this->DEVELOPMENT_bootstrap();
+	}
+	
+	/**
+	 * @destructor
+	 * @param
+	 */
+	
+	function __destruct() {
+	}
+	
+	/**
+	 * @param
+	 * @return
+	 * @type string
+	 */
+	 
+	function DEVELOPMENT_bootstrap() {
+		$this->testArray	  = array("a","b","c");
+		
+		$this->mapbenderFrameName = "mapframe1";
+		$this->mapbenderElement   = "maps";
+		$this->mapURL             = "http://wms1.ccgis.de/cgi-bin/mapserv?map=/data/umn/mapbender_user/mapbender_user.map&VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=Mapbender_User,Mapbender_Names&STYLES=,&SRS=EPSG:31467&BBOX=3532281.25,5727000,3755718.75,5870000&WIDTH=625&HEIGHT=400&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_xml&SLD=100&";
+		$this->mapSRS             = "EPSG:31467";
+		$this->mapWidth           = "625";
+		$this->mapHeight          = "400";
+		$this->mapExtent          = "3532281.25,5727000,3755718.75,5870000";
+		$this->mapVisibleLayers   = "Topographie,Grenze,Bundeslaender";
+	}
+}
+
+/**
+ * @class
+ */
+
+class map2JSON extends map2object {
+
+	/**
+	 * @param
+	 */
+	
+	function __toString() {
+		$this->encodeJSON();
+		
+		return (string)$this->JSON;
+	}
+	
+	/**
+	 *@param
+	 */
+	 
+	function encodeJSON() {
+		$this->JSON = json_encode(get_object_vars($this));
+	}
+	
+	/**
+	 *@param
+	 */
+	 
+	function getJSON() {
+		return $this->JSON;
+	}
+
+}
+
+$map2object = new map2object();
+$map2JSON   = new map2JSON();
+
+echo "<pre>",$map2object->getJSON,"</pre>";
+echo "<pre>",$map2JSON,"</pre>";
+?>
\ No newline at end of file



More information about the Mapbender_commits mailing list