[Mapbender-commits] r8182 - branches/2.7/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Oct 13 10:03:32 EDT 2011
Author: verenadiewald
Date: 2011-10-13 07:03:31 -0700 (Thu, 13 Oct 2011)
New Revision: 8182
Modified:
branches/2.7/http/classes/class_gml_line.php
branches/2.7/http/classes/class_gml_multipolygon.php
branches/2.7/http/classes/class_gml_polygon.php
Log:
added function getBbox
Modified: branches/2.7/http/classes/class_gml_line.php
===================================================================
--- branches/2.7/http/classes/class_gml_line.php 2011-10-11 21:45:23 UTC (rev 8181)
+++ branches/2.7/http/classes/class_gml_line.php 2011-10-13 14:03:31 UTC (rev 8182)
@@ -95,7 +95,7 @@
public function getBbox () {
$bboxArray = array();
- for ($i = 0; $i < count($pointArray); $i++) {
+ for ($i = 0; $i < count($this->pointArray); $i++) {
$p = new Mapbender_point(
$this->pointArray[$i]["x"],
$this->pointArray[$i]["y"],
Modified: branches/2.7/http/classes/class_gml_multipolygon.php
===================================================================
--- branches/2.7/http/classes/class_gml_multipolygon.php 2011-10-11 21:45:23 UTC (rev 8181)
+++ branches/2.7/http/classes/class_gml_multipolygon.php 2011-10-13 14:03:31 UTC (rev 8182)
@@ -181,5 +181,21 @@
}
return $str;
}
+
+ public function getBbox () {
+ $bboxArray = array();
+ for ($i = 0; $i < count($this->polygonArray); $i++) {
+ if($this->polygonArray[$i]["x"] && $this->polygonArray[$i]["y"]) {
+ $p = new Mapbender_point(
+ $this->polygonArray[$i]["x"],
+ $this->polygonArray[$i]["y"],
+ $this->srs
+ );
+ $bboxArray[]= new Mapbender_bbox($p, $p, $this->srs);
+ }
+ }
+ return Mapbender_bbox::union($bboxArray);
+ }
+
}
?>
Modified: branches/2.7/http/classes/class_gml_polygon.php
===================================================================
--- branches/2.7/http/classes/class_gml_polygon.php 2011-10-11 21:45:23 UTC (rev 8181)
+++ branches/2.7/http/classes/class_gml_polygon.php 2011-10-13 14:03:31 UTC (rev 8182)
@@ -148,5 +148,20 @@
}
return $str;
}
+
+ public function getBbox () {
+ $bboxArray = array();
+ for ($i = 0; $i < count($this->pointArray); $i++) {
+ if($this->pointArray[$i]["x"] && $this->pointArray[$i]["y"]) {
+ $p = new Mapbender_point(
+ $this->pointArray[$i]["x"],
+ $this->pointArray[$i]["y"],
+ $this->srs
+ );
+ $bboxArray[]= new Mapbender_bbox($p, $p, $this->srs);
+ }
+ }
+ return Mapbender_bbox::union($bboxArray);
+ }
}
?>
\ No newline at end of file
More information about the Mapbender_commits
mailing list