[Mapbender-commits] r2533 - in branches/beck_dev/mapbender/http:
classes javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jun 23 10:57:04 EDT 2008
Author: christoph
Date: 2008-06-23 10:57:04 -0400 (Mon, 23 Jun 2008)
New Revision: 2533
Removed:
branches/beck_dev/mapbender/http/classes/class.map2object.php
Modified:
branches/beck_dev/mapbender/http/classes/class_gml2.php
branches/beck_dev/mapbender/http/classes/class_weldMaps2Image.php
branches/beck_dev/mapbender/http/javascripts/mod_add_SLD.php
Log:
merged with trunk
Deleted: branches/beck_dev/mapbender/http/classes/class.map2object.php
===================================================================
--- branches/beck_dev/mapbender/http/classes/class.map2object.php 2008-06-23 14:31:46 UTC (rev 2532)
+++ branches/beck_dev/mapbender/http/classes/class.map2object.php 2008-06-23 14:57:04 UTC (rev 2533)
@@ -1,97 +0,0 @@
-<?php
-ini_set("display_errors","on");
-
-/**
- * @class
- */
-
-class map2object {
-
- var $mapbenderFrameName;
- var $mapbenderElement;
-
- var $mapURL;
- var $mapSRS;
- var $mapWidth;
- var $mapHeight;
- var $mapExtent;
- var $mapVisibleLayers;
-
- var $mapWMS = array();
-
- /**
- * @constructor
- * @param
- */
-
- function __construct() {
- $this->DEVELOPMENT_bootstrap();
- }
-
- /**
- * @destructor
- * @param
- */
-
- function __destruct() {
- }
-
- /**
- * @param
- * @return
- * @type string
- */
-
- function DEVELOPMENT_bootstrap() {
- $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";
- $this->mapWMS["a"] = "A";
- $this->mapWMS["b"] = "B";
- $this->mapWMS["c"] = "C";
- }
-}
-
-/**
- * @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;
- }
-
-}
-
-$map2JSON = new map2JSON();
-
-echo "<pre>",$map2JSON,"</pre>";
-?>
\ No newline at end of file
Modified: branches/beck_dev/mapbender/http/classes/class_gml2.php
===================================================================
--- branches/beck_dev/mapbender/http/classes/class_gml2.php 2008-06-23 14:31:46 UTC (rev 2532)
+++ branches/beck_dev/mapbender/http/classes/class_gml2.php 2008-06-23 14:57:04 UTC (rev 2533)
@@ -427,6 +427,49 @@
return $nodeName;
}
+ /**
+ * Parses the feature segment of a GML and stores the geometry in the
+ * $geometry variable of the class.
+ *
+ * Example of a feature segment of a GML.
+ * <gml:featureMember>
+ * <ms:ROUTE fid="ROUTE.228168">
+ * <gml:boundedBy>
+ * <gml:Box srsName="EPSG:31466">
+ * <gml:coordinates>2557381.0,5562371.1 2557653.7,5562526.0</gml:coordinates>
+ * </gml:Box>
+ * </gml:boundedBy>
+ * <ms:geometry>
+ * <gml:LineString>
+ * <gml:coordinates>
+ * 2557380.97,5562526 2557390.96,
+ * 5562523.22 2557404.03,5562518.2 2557422.31,
+ * 5562512 2557437.16,5562508.37 2557441.79,
+ * 5562507.49 2557454.31,5562505.1 2557464.27,
+ * 5562503.97 2557473.24,5562502.97 2557491.67,
+ * 5562502.12 2557505.65,5562502.43 2557513.78,
+ * 5562501.12 2557520.89,5562498.79 2557528.5,
+ * 5562495.07 2557538.9,5562488.91 2557549.5,
+ * 5562483.83 2557558.55,5562476.61 2557569.07,
+ * 5562469.82 2557576.61,5562462.72 2557582.75,
+ * 5562457.92 2557588.57,5562452.56 2557590.38,
+ * 5562449.69 2557593.57,5562445.07 2557596.17,
+ * 5562441.31 2557601.71,5562433.93 2557612.97,
+ * 5562421.03 2557626,5562405.33 2557639.66,
+ * 5562389.75 2557653.69,5562371.12
+ * </gml:coordinates>
+ * </gml:LineString>
+ * </ms:geometry>
+ * <code>354</code>
+ * <Verkehr>0</Verkehr>
+ * <rlp>t</rlp>
+ * </ms:ROUTE>
+ * </gml:featureMember>
+ *
+ * @return void
+ * @param $domNode DOMNodeObject the feature tag of the GML
+ * (<gml:featureMember> in the above example)
+ */
public function parse($domNode) {
$currentSibling = $domNode->firstChild;
@@ -443,10 +486,14 @@
$ns = $namespace['ns'];
$columnName = $namespace['value'];
- if ($name==$ns.":the_geom"){
+ // check if this node is a geometry node.
+ // however, even if it is a property node,
+ // it has a child node, the text node!
+ // So we might need to do something more
+ // sophisticated here...
+ if ($currentSibling->hasChildNodes()){
$geomNode = $currentSibling->firstChild;
$geomType = $geomNode->nodeName;
-// echo "geomtype: " . $geomType . "<br>";
switch ($geomType) {
case "gml:Polygon" :
$this->geometry = new GMLPolygon();
@@ -459,27 +506,28 @@
case "gml:Point" :
$this->geometry = new GMLPoint();
$this->geometry->parsePoint($geomNode);
-# $this->properties["Mapbender:icon"] = "../img/sy_star.png";
break;
case "gml:MultiLineString" :
$this->geometry = new GMLMultiLine();
$this->geometry->parseMultiLine($geomNode);
-// $this->properties["Mapbender:icon"] = "../img/sy_star.png";
break;
case "gml:MultiPolygon" :
$this->geometry = new GMLMultiPolygon();
$this->geometry->parseMultiPolygon($geomNode);
-// $this->properties["Mapbender:icon"] = "../img/sy_star.png";
break;
+ default:
+ $this->properties[$columnName] = $value;
+ break;
}
- } else {
- $this->properties[$columnName] = $value;
+ }
+ else {
+ $this->properties[$columnName] = $value;
}
$currentSibling = $currentSibling->nextSibling;
}
}
-
+
public function toGeoJSON () {
$str = "";
$str .= "{\"type\":\"Feature\", \"id\":\"".$this->fid."\", \"geometry\": ";
Modified: branches/beck_dev/mapbender/http/classes/class_weldMaps2Image.php
===================================================================
--- branches/beck_dev/mapbender/http/classes/class_weldMaps2Image.php 2008-06-23 14:31:46 UTC (rev 2532)
+++ branches/beck_dev/mapbender/http/classes/class_weldMaps2Image.php 2008-06-23 14:57:04 UTC (rev 2533)
@@ -1,5 +1,5 @@
<?php
-# $Id$
+# $Id:class_weldMaps2Image.php 2406 2008-04-23 15:59:31Z christoph $
# http://www.mapbender.org/
# Copyright (C) 2002 CCGIS
#
Modified: branches/beck_dev/mapbender/http/javascripts/mod_add_SLD.php
===================================================================
--- branches/beck_dev/mapbender/http/javascripts/mod_add_SLD.php 2008-06-23 14:31:46 UTC (rev 2532)
+++ branches/beck_dev/mapbender/http/javascripts/mod_add_SLD.php 2008-06-23 14:57:04 UTC (rev 2533)
@@ -1,5 +1,5 @@
<?php
-# $Id$
+# $Id:mod_add_SLD.php 2413 2008-04-23 16:21:04Z christoph $
# add SLD-Parameter parameters to MapRequest
# http://www.mapbender.org/index.php/mod_add_vendorspecific.php
# Copyright (C) 2002 CCGIS
More information about the Mapbender_commits
mailing list