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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Nov 30 11:28:58 EST 2010


Author: armin11
Date: 2010-11-30 08:28:58 -0800 (Tue, 30 Nov 2010)
New Revision: 7170

Modified:
   trunk/mapbender/http/php/mod_interfaceWms4Kml.php
   trunk/mapbender/http/php/mod_layerISOMetadata.php
   trunk/mapbender/http/php/mod_layerISOMetadataWriteToFolder.php
   trunk/mapbender/http/php/tagCloud.php
Log:
some bugfixing and modules from geoportal.rlp project

Modified: trunk/mapbender/http/php/mod_interfaceWms4Kml.php
===================================================================
--- trunk/mapbender/http/php/mod_interfaceWms4Kml.php	2010-11-30 15:44:48 UTC (rev 7169)
+++ trunk/mapbender/http/php/mod_interfaceWms4Kml.php	2010-11-30 16:28:58 UTC (rev 7170)
@@ -59,6 +59,6 @@
 $kml.="</GroundOverlay>".chr(13).chr(10);
 $kml.="</kml>".chr(13).chr(10);
 header("Content-Type: application/vnd.google-earth.kml+xml");
-header("Content-Disposition: attachment; filename=\"KML WMS Layer\"");
+header("Content-Disposition: attachment; filename=\"Geoportal.rlp_layer_".$layerId.".kml\"");
 echo $kml;
 ?>

Modified: trunk/mapbender/http/php/mod_layerISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_layerISOMetadata.php	2010-11-30 15:44:48 UTC (rev 7169)
+++ trunk/mapbender/http/php/mod_layerISOMetadata.php	2010-11-30 16:28:58 UTC (rev 7170)
@@ -26,7 +26,7 @@
 db_select_db(DB,$con);
 
 //define the view or table to use as input for metadata generation
-$wmsView = "wms_search_table_test";
+$wmsView = "wms_search_table";
 $wmsView = '';
 //parse request parameter
 //make all parameters available as upper case
@@ -427,7 +427,7 @@
 		$MD_BrowseGraphic=$iso19139->createElement("gmd:MD_BrowseGraphic");
 		$fileName=$iso19139->createElement("gmd:fileName");
 		$fileName_cs=$iso19139->createElement("gco:CharacterString");
-		$previewFilenameText = $iso19139->createTextNode("http://www.gdi-rp-dienste3.rlp.de/mapbender/x_geoportal/layer_preview/".$row['layer_map_preview_filename']);
+		$previewFilenameText = $iso19139->createTextNode("http://www.gdi-rp-dienste3.rlp.de/mapbender/geoportal/preview/".$row['layer_map_preview_filename']);
 		$fileName_cs->appendChild($previewFilenameText);
 		$fileName->appendChild($fileName_cs);
 
@@ -561,6 +561,18 @@
 	$localName->appendChild($serviceTypeText);
 	$serviceType->appendChild($localName);
 	$SV_ServiceIdentification->appendChild($serviceType);
+
+
+
+	$serviceTypeVersion=$iso19139->createElement("srv:serviceTypeVersion");
+	$serviceTypeVersion_cs=$iso19139->createElement("gco:CharacterString");
+	$serviceTypeVersionText=$iso19139->createTextNode("1.1.1");
+
+	$serviceTypeVersion_cs->appendChild($serviceTypeVersionText);
+	$serviceTypeVersion->appendChild($serviceTypeVersion_cs);
+	$SV_ServiceIdentification->appendChild($serviceTypeVersion);
+
+
 	# Part B 1.7 Dataset Language
 	#if(isset($detail_array['t01_object.data_language'])){
 		#$language=$iso19139->createElement("gmd:language");
@@ -631,7 +643,69 @@
 	$extent->appendChild($EX_Extent);
 
 	$SV_ServiceIdentification->appendChild($extent);
+
+
+#to the things which have to be done for integrating the service into a client like portalu ... they have defined another location to put the GetCap URL than INSPIRE does it
+
+	$containsOperation=$iso19139->createElement("srv:containsOperation");
+	$SV_OperationMetadata=$iso19139->createElement("srv:SV_OperationMetadata");
+
+
+	$operationName=$iso19139->createElement("srv:operationName");
+	$operationName_cs=$iso19139->createElement("gco:CharacterString");
+
+	$operationNameText=$iso19139->createTextNode("GetCapabilities");
 	
+	$operationName_cs->appendChild($operationNameText);
+	$operationName->appendChild($operationName_cs);
+
+//srv DCP **************************************
+	$DCP=$iso19139->createElement("srv:DCP");
+	$DCPList=$iso19139->createElement("srv:DCPList");
+	$DCPList->setAttribute("codeList", "DCPList");
+	$DCPList->setAttribute("codeListValue", "WebService");
+
+
+	$DCP->appendChild($DCPList);
+	
+//connectPoint **********************************
+	$connectPoint=$iso19139->createElement("srv:connectPoint");
+	
+	$CI_OnlineResource=$iso19139->createElement("gmd:CI_OnlineResource");
+
+	$gmd_linkage=$iso19139->createElement("gmd:linkage");
+	$gmd_URL=$iso19139->createElement("gmd:URL");
+	//Check if anonymous user has rights to access this layer - if not ? which resource should be advertised? TODO
+	if ($hasPermission) {
+		$gmd_URLText=$iso19139->createTextNode("http://".$_SERVER['HTTP_HOST']."/mapbender/php/wms.php?layer_id=".$mapbenderMetadata['layer_id']."");
+	}
+	else {
+		$gmd_URLText=$iso19139->createTextNode("https://".$_SERVER['HTTP_HOST']."/http_auth/".$mapbenderMetadata['layer_id']."?");
+	}
+	$gmd_URL->appendChild($gmd_URLText);
+	$gmd_linkage->appendChild($gmd_URL);
+	$CI_OnlineResource->appendChild($gmd_linkage);
+	$connectPoint->appendChild($CI_OnlineResource);
+//connectPoint END *****************************
+
+
+
+$SV_OperationMetadata->appendChild($operationName);
+$SV_OperationMetadata->appendChild($DCP);
+$SV_OperationMetadata->appendChild($connectPoint);
+
+$SV_ServiceIdentification->appendChild($SV_OperationMetadata);
+	
+
+/*
+
+	$serviceTypeVersion_cs->appendChild($serviceTypeVersionText);
+	$serviceTypeVersion->appendChild($serviceTypeVersion_cs);
+	$SV_ServiceIdentification->appendChild($serviceTypeVersion);
+*/
+
+
+	
 	$identificationInfo->appendChild($SV_ServiceIdentification);
 	
 	//distributionInfo
@@ -653,7 +727,7 @@
 	$gmd_URL=$iso19139->createElement("gmd:URL");
 	//Check if anonymous user has rights to access this layer - if not ? which resource should be advertised? TODO
 	if ($hasPermission) {
-		$gmd_URLText=$iso19139->createTextNode("http://www.geoportal.rlp.de/mapbender/x_geoportal/wms.php?layer_id=".$mapbenderMetadata['layer_id']."");
+		$gmd_URLText=$iso19139->createTextNode("http://www.geoportal.rlp.de/mapbender/php/wms.php?layer_id=".$mapbenderMetadata['layer_id']."");
 	}
 	else {
 		$gmd_URLText=$iso19139->createTextNode("https://www.geoportal.rlp.de/http_auth/".$mapbenderMetadata['layer_id']."?");

Modified: trunk/mapbender/http/php/mod_layerISOMetadataWriteToFolder.php
===================================================================
--- trunk/mapbender/http/php/mod_layerISOMetadataWriteToFolder.php	2010-11-30 15:44:48 UTC (rev 7169)
+++ trunk/mapbender/http/php/mod_layerISOMetadataWriteToFolder.php	2010-11-30 16:28:58 UTC (rev 7170)
@@ -55,7 +55,7 @@
 $res = db_prep_query($sql,$v,$t);
 
 $generatorScript = '/mapbender/php/mod_layerISOMetadata.php?';
-$generatorBaseUrl = 'http://localhost'.$generatorScript;
+$generatorBaseUrl = 'http://'.$_SERVER['HTTP_HOST'].$generatorScript;
 
 echo $generatorBaseUrl."<br>";
 

Modified: trunk/mapbender/http/php/tagCloud.php
===================================================================
--- trunk/mapbender/http/php/tagCloud.php	2010-11-30 15:44:48 UTC (rev 7169)
+++ trunk/mapbender/http/php/tagCloud.php	2010-11-30 16:28:58 UTC (rev 7170)
@@ -144,7 +144,7 @@
 
 for($i=0; $i<count($tags); $i++){
 	if ($scale == 'linear'){
-		$tags[$i]['weight'] = $minFontSize+($i*$inc);
+		$tags[$i]['weight'] = $maxFontSize-($i*$inc);
 	} else {
 		$tags[$i]['weight'] = $tags[$i]['weight']*$maxFontSize/$maxWeight;
 	}



More information about the Mapbender_commits mailing list