[Mapbender-commits] r4211 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jun 25 06:57:25 EDT 2009


Author: vera
Date: 2009-06-25 06:57:25 -0400 (Thu, 25 Jun 2009)
New Revision: 4211

Modified:
   trunk/mapbender/http/javascripts/mod_renderGML.php
Log:
session var angepasst

Modified: trunk/mapbender/http/javascripts/mod_renderGML.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_renderGML.php	2009-06-25 10:54:15 UTC (rev 4210)
+++ trunk/mapbender/http/javascripts/mod_renderGML.php	2009-06-25 10:57:25 UTC (rev 4211)
@@ -1,50 +1,51 @@
-<?php
-# http://www.mapbender.org/index.php/Monitor_Capabilities
-# Copyright (C) 2002 CCGIS 
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../classes/class_gml2.php");
-
-$gml_string = $_SESSION["GML"];
-
-if ($gml_string) {
-	$gml = new gml2();
-	$gml->parse_xml($gml_string);
-	$bbox = $gml->bbox;
-	echo "mb_registerInitFunctions('highlight_init()');\n";
-	echo "function highlight_init() {\n";
-	echo "var mf = new Array(";
-	for ($i=0; $i<count($e_target); $i++) {
-		if ($i>0) echo ", ";
-		echo "'".$e_target[$i]."'";
-	}
-	echo ");\n";
-	echo "hl = new Highlight(mf, 'GML_rendering', {'position':'absolute', 'top':'0px', 'left':'0px', 'z-index':" . GML_HIGHLIGHT_Z_INDEX . "});\n";
-	echo $gml->exportMemberToJS(0, false);
-	echo "hl.add(q);\n";
-	echo "hl.paint();\n";
-	echo "mb_registerSubFunctions('hl.paint()');\n";
-	echo "}\n";
-	$e = new mb_notice("renderGML: GML: " . $_SESSION["GML"] . "; EPSG: " . $_SESSION["epsg"] . "; BBOX: " . implode(", ", $bbox));
-	$_SESSION["GML"] = NULL;
-	$e = new mb_notice("renderGML: deleting GML...");
-	
-}
-else {
-	$e = new mb_notice("renderGML: no GML.");
-}
+<?php
+# http://www.mapbender.org/index.php/Monitor_Capabilities
+# Copyright (C) 2002 CCGIS 
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_gml2.php");
+
+$gml_string = Mapbender::session()->get("GML");
+
+if ($gml_string) {
+	$gml = new gml2();
+	$gml->parse_xml($gml_string);
+	$bbox = $gml->bbox;
+	echo "mb_registerInitFunctions('highlight_init()');\n";
+	echo "function highlight_init() {\n";
+	echo "var mf = new Array(";
+	for ($i=0; $i<count($e_target); $i++) {
+		if ($i>0) echo ", ";
+		echo "'".$e_target[$i]."'";
+	}
+	echo ");\n";
+	echo "hl = new Highlight(mf, 'GML_rendering', {'position':'absolute', 'top':'0px', 'left':'0px', 'z-index':" . GML_HIGHLIGHT_Z_INDEX . "});\n";
+	echo $gml->exportMemberToJS(0, false);
+	echo "hl.add(q);\n";
+	echo "hl.paint();\n";
+	echo "mb_registerSubFunctions('hl.paint()');\n";
+	echo "}\n";
+	$e = new mb_notice("renderGML: GML: " . Mapbender::session()->get("GML") . "; EPSG: " . Mapbender::session()->get("epsg") . "; BBOX: " . implode(", ", $bbox));
+	Mapbender::session()->set("GML",NULL);
+
+	$e = new mb_notice("renderGML: deleting GML...");
+	
+}
+else {
+	$e = new mb_notice("renderGML: no GML.");
+}
 ?>
\ No newline at end of file



More information about the Mapbender_commits mailing list