[mapserver-commits] r8461 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Jan 28 10:26:36 EST 2009


Author: tomkralidis
Date: 2009-01-28 10:26:35 -0500 (Wed, 28 Jan 2009)
New Revision: 8461

Modified:
   trunk/mapserver/mapcontext.c
Log:
add support for WMS Server title in LAYER object


Modified: trunk/mapserver/mapcontext.c
===================================================================
--- trunk/mapserver/mapcontext.c	2009-01-28 00:28:12 UTC (rev 8460)
+++ trunk/mapserver/mapcontext.c	2009-01-28 15:26:35 UTC (rev 8461)
@@ -950,6 +950,9 @@
       }
   }
 
+  /* Server Title */
+  msGetMapContextXMLHashValue(psLayer, "Server.title", &(layer->metadata),  "wms_server_title");
+
   /* Abstract */
   msGetMapContextXMLHashValue(psLayer, "Abstract", &(layer->metadata), 
                               "wms_abstract");
@@ -1698,7 +1701,13 @@
                                        NULL, "wms_server_version", OWS_WARN,
                           "      <Server service=\"OGC:WMS\" version=\"%s\" ",
                                        "1.0.0");
-          if(GET_LAYER(map, i)->name)
+
+          if(msOWSLookupMetadata(&(GET_LAYER(map, i)->metadata), "MO", "server_title"))
+              msOWSPrintEncodeMetadata(stream, &(GET_LAYER(map, i)->metadata),
+                                       NULL, "wms_server_title", OWS_NOERR,
+                                       "title=\"%s\">\n", "");
+
+          else if(GET_LAYER(map, i)->name)
               msOWSPrintEncodeMetadata(stream, &(GET_LAYER(map, i)->metadata), 
                                        NULL, "wms_title", OWS_NOERR, 
                                        "title=\"%s\">\n", GET_LAYER(map, i)->name);



More information about the mapserver-commits mailing list