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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Sep 30 03:57:28 PDT 2016


Author: armin11
Date: 2016-09-30 03:57:27 -0700 (Fri, 30 Sep 2016)
New Revision: 9615

Modified:
   trunk/mapbender/http/javascripts/initWmcObj.php
Log:
Small bugfix

Modified: trunk/mapbender/http/javascripts/initWmcObj.php
===================================================================
--- trunk/mapbender/http/javascripts/initWmcObj.php	2016-09-30 09:44:11 UTC (rev 9614)
+++ trunk/mapbender/http/javascripts/initWmcObj.php	2016-09-30 10:57:27 UTC (rev 9615)
@@ -407,7 +407,7 @@
 //$e = new mb_exception("get parameter for geojsonzoom: ".$getApi->getGeojsonZoom());
 $zoomToExtent = $getApi->getGeojsonZoom();
 $offset = $getApi->getGeojsonZoomOffset();
-//$e = new mb_exception("offset from initWmcObj: ".$offset);
+$e = new mb_exception("offset from initWmcObj: ".$offset);
 /*if ($offset == false) {
 	$e = new mb_exception('no offset given');
 }*/
@@ -481,13 +481,13 @@
 	//$i++;
 	}
 	if ($zoomToExtent == 'true') {
-		if ($minx == $maxx || $miny = $maxy) {
-			$offset = 100;
-		}
 		$minx = min($longitudes);
 		$miny = min($latitudes);
 		$maxx = max($longitudes);
 		$maxy = max($latitudes);
+		if ($minx == $maxx || $miny == $maxy) {
+			$offset = 100;
+		}
 		if ($offset !== false) {
 			$averageLatitude = ($maxy - $miny) / 2;
 			$r = 6371000.0;



More information about the Mapbender_commits mailing list