[Mapbender-commits] r2423 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu May 1 05:34:02 EDT 2008


Author: astrid_emde
Date: 2008-05-01 05:34:02 -0400 (Thu, 01 May 2008)
New Revision: 2423

Modified:
   trunk/mapbender/http/php/mod_layerMetadata.php
Log:
- litte bug in metadatastr ", " added
- Metadaten link added to metadataurl, link opens in new window
- Minscale,Maxscale as 1:100 instead of 100, or - if defined as 0

Modified: trunk/mapbender/http/php/mod_layerMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_layerMetadata.php	2008-05-01 09:22:18 UTC (rev 2422)
+++ trunk/mapbender/http/php/mod_layerMetadata.php	2008-05-01 09:34:02 UTC (rev 2423)
@@ -100,8 +100,18 @@
 	$layer['Titel'] = $row['layer_title'];
 	$layer['Zusammenfassung'] = $row['layer_abstract'];
 	if ($row['layer_pos'] || $row['layer_parent']) {
-		$layer['Minscale'] = $row['layer_minscale'];
-		$layer['Maxscale'] = $row['layer_maxscale'];
+	  if ($row['layer_minscale'] > 0)
+		{
+		$layer['Minscale'] = "1 : ". $row['layer_minscale'];
+		}
+		else
+		{$layer['Minscale'] = "-";}
+		if ($row['layer_maxscale'] > 0)
+		{
+		$layer['Maxscale'] = "1 : ". $row['layer_maxscale'];
+		}
+		else
+		{$layer['Maxscale'] = "-";}
 	}
 	$layer['Koordinatensysteme'] = preg_replace("/ /", ", ", getEpsgByLayerId($row['layer_id']));
 //	$layer['Capabilities-Dokument'] = "<a href = '../x_geoportal/getCapabilities_document.php?wms_request=".$row['wms_id']."&layer_request=".$row['layer_pos']."' target=_blank>Capabilities-Dokument</a>";
@@ -127,10 +137,11 @@
 	$layer['Fax'] = $row['contactfacsimiletelephone'];
 	$layer['E-Mail'] = $row['contactelectronicmailaddress'];
 	$layer['Land'] = $row['country'];
+	$layer['Metadaten'] = $row['layer_metadataurl'];
 	$metadataUrl = $row['layer_metadataurl'];
 
-	if ($metadataUrl && $redirectToMetadataUrl) {
-		header("Location: " . $metadataUrl);		
+	if ($layer['Metadaten'] && $redirectToMetadataUrl) {
+		header("Location: " . $layer['Metadaten']);		
 	}	
 	else {
 		$metadataStr .=  "<table >\n";
@@ -159,7 +170,7 @@
 			}
 			$metadataStr .=  "<tr><th>Ebenen</th><td>";
 			for ($i=0; $i<count($layer); $i++) {
-				if ($i >0) echo ", ";
+				if ($i >0) $metadataStr .=  ", ";
 				$metadataStr .=  "<a href='mod_layerMetadata.php?id=".$layer[$i]['id']."'>" . $layer[$i]['Titel'] . "</a>";
 			}
 		}	



More information about the Mapbender_commits mailing list