[Mapbender-commits] r9058 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Sep 4 02:15:53 PDT 2014
Author: armin11
Date: 2014-09-04 02:15:52 -0700 (Thu, 04 Sep 2014)
New Revision: 9058
Modified:
trunk/mapbender/http/classes/class_wms.php
Log:
Use only the wgs84bbox (EPSG:4326) for calculating the other ones
Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php 2014-09-04 09:14:51 UTC (rev 9057)
+++ trunk/mapbender/http/classes/class_wms.php 2014-09-04 09:15:52 UTC (rev 9058)
@@ -2386,6 +2386,12 @@
array_push($miny,$row_epsg['miny']);
array_push($maxx,$row_epsg['maxx']);
array_push($maxy,$row_epsg['maxy']);
+ if (strtoupper($row_epsg['epsg']) == "EPSG:4326") {
+ $wgs84Minx = $row_epsg['minx'];
+ $wgs84Miny = $row_epsg['miny'];
+ $wgs84Maxx = $row_epsg['maxx'];
+ $wgs84Maxy = $row_epsg['maxy'];
+ }
$cnt++;
}
@@ -2403,11 +2409,10 @@
//compute this only, if the srs was not already in the current layer - see array epsg!
if(!in_array($supportedSrs[$k],$epsg) && $supportedSrs[$k] != '') {
$n = new mb_notice("Calculation for: ".$supportedSrs[$k]);
- $pointMin = new Mapbender_point($minx[0], $miny[0], $epsg[0]);
- $pointMax = new Mapbender_point($maxx[0], $maxy[0], $epsg[0]);
+ $pointMin = new Mapbender_point($wgs84Minx, $wgs84Miny, "EPSG:4326");
+ $pointMax = new Mapbender_point($wgs84Maxx, $wgs84Maxy, "EPSG:4326");
$pointMin->transform($supportedSrs[$k]);
$pointMax->transform($supportedSrs[$k]);
-
if($pointMin->epsg != '' && $pointMin->x != '' && $pointMin->y != ''
&& $pointMax->x != '' && $pointMax->y != '') {
$sql_bbox = "INSERT INTO layer_epsg (fkey_layer_id, epsg, minx, miny, maxx, maxy) ";
More information about the Mapbender_commits
mailing list