Hello
trying to use define SRS_ARRAY in mapbender.conf are not working with
geoserver (for me 2.1)
because the parent layer have no name (you can see the example i have send
I solved the problem with this patch
hope it could be integrated
diff --git http/classes/class_wms.php http/classes/class_wms.php
index e559492..d92300b 100644
--- http/classes/class_wms.php
+++ http/classes/class_wms.php
@@ -1928,8 +1928,11 @@ SQL;
$layerName=$row['layer_name'];
//defining the xpath for getting all Layer-tags
$xpathLayerName="//Layer[./Name =\"".$layerName."\"]";
-
$layerObject=$wmsCapXml->xpath($xpathLayerName);
+ if (empty($layerObject)){
+ $xpathLayerName="//Layer[./Title =\"".$layerName."\"]";
+ $layerObject=$wmsCapXml->xpath($xpathLayerName);
+ }
//for none named layer (only title is set)
if(!isset($layerObject[0])) {
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://192.168.1.1:80/geoserver/schemas/wms/1.1.1/WMS_MS_Capabilities.dtd">
<WMT_MS_Capabilities version="1.1.1" updateSequence="1305">
<Service>
<Name>OGC:WMS</Name>
<Title>GeoServer Web Map Service</Title>
<Abstract>A compliant implementation of WMS plus most of the SLD extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS</Abstract>
<KeywordList>
<Keyword>WFS</Keyword>
<Keyword>WMS</Keyword>
<Keyword>GEOSERVER</Keyword>
</KeywordList>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://geoserver.sourceforge.net/html/index.php"/>
<ContactInformation>
<ContactPersonPrimary>
<ContactPerson>Claudius Ptolomaeus</ContactPerson>
<ContactOrganization>The ancient geographes INC</ContactOrganization>
</ContactPersonPrimary>
<ContactPosition>Chief geographer</ContactPosition>
<ContactAddress>
<AddressType>Work</AddressType>
<Address/>
<City>Alexandria</City>
<StateOrProvince/>
<PostCode/>
<Country>Egypt</Country>
</ContactAddress>
<ContactVoiceTelephone/>
<ContactFacsimileTelephone/>
<ContactElectronicMailAddress>[email protected]</ContactElectronicMailAddress>
</ContactInformation>
<Fees>NONE</Fees>
<AccessConstraints>NONE</AccessConstraints>
</Service>
<Capability>
<Request>
<GetCapabilities>
<Format>application/vnd.ogc.wms_xml</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.1.1:80/geoserver/mynamespace/wms?SERVICE=WMS&"/>
</Get>
<Post>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.1.1:80/geoserver/mynamespace/wms?SERVICE=WMS&"/>
</Post>
</HTTP>
</DCPType>
</GetCapabilities>
<GetMap>
<Format>image/png</Format>
<Format>application/atom xml</Format>
<Format>application/atom+xml</Format>
<Format>application/openlayers</Format>
<Format>application/pdf</Format>
<Format>application/rss xml</Format>
<Format>application/rss+xml</Format>
<Format>application/vnd.google-earth.kml</Format>
<Format>application/vnd.google-earth.kml xml</Format>
<Format>application/vnd.google-earth.kml+xml</Format>
<Format>application/vnd.google-earth.kmz</Format>
<Format>application/vnd.google-earth.kmz xml</Format>
<Format>application/vnd.google-earth.kmz+xml</Format>
<Format>atom</Format>
<Format>image/geotiff</Format>
<Format>image/geotiff8</Format>
<Format>image/gif</Format>
<Format>image/jpeg</Format>
<Format>image/png8</Format>
<Format>image/svg</Format>
<Format>image/svg xml</Format>
<Format>image/svg+xml</Format>
<Format>image/tiff</Format>
<Format>image/tiff8</Format>
<Format>kml</Format>
<Format>kmz</Format>
<Format>openlayers</Format>
<Format>rss</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.1.1:80/geoserver/mynamespace/wms?SERVICE=WMS&"/>
</Get>
</HTTP>
</DCPType>
</GetMap>
<GetFeatureInfo>
<Format>text/plain</Format>
<Format>application/vnd.ogc.gml</Format>
<Format>text/html</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.1.1:80/geoserver/mynamespace/wms?SERVICE=WMS&"/>
</Get>
<Post>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.1.1:80/geoserver/mynamespace/wms?SERVICE=WMS&"/>
</Post>
</HTTP>
</DCPType>
</GetFeatureInfo>
<DescribeLayer>
<Format>application/vnd.ogc.wms_xml</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.1.1:80/geoserver/mynamespace/wms?SERVICE=WMS&"/>
</Get>
</HTTP>
</DCPType>
</DescribeLayer>
<GetLegendGraphic>
<Format>image/png</Format>
<Format>image/jpeg</Format>
<Format>image/gif</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.1.1:80/geoserver/mynamespace/wms?SERVICE=WMS&"/>
</Get>
</HTTP>
</DCPType>
</GetLegendGraphic>
<GetStyles>
<Format>application/vnd.ogc.sld+xml</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.1.1:80/geoserver/mynamespace/wms?SERVICE=WMS&"/>
</Get>
</HTTP>
</DCPType>
</GetStyles>
</Request>
<Exception>
<Format>application/vnd.ogc.se_xml</Format>
<Format>application/vnd.ogc.se_inimage</Format>
</Exception>
<UserDefinedSymbolization SupportSLD="1" UserLayer="1" UserStyle="1" RemoteWFS="1"/>
<Layer>
<Title>GeoServer Web Map Service</Title>
<Abstract>A compliant implementation of WMS plus most of the SLD extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS</Abstract>
<!--Limited list of EPSG projections:-->
<SRS>EPSG:3945</SRS>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="6.743" miny="55.159" maxx="6.788" maxy="55.197"/>
<Layer queryable="1">
<Name>mynamespace:antennas</Name>
<Title>antennas</Title>
<Abstract/>
<KeywordList/>
<SRS>EPSG:3945</SRS>
<!--WKT definition of this CRS:
PROJCS["RGF93 / CC45",
GEOGCS["RGF93",
DATUM["Reseau Geodesique Francais 1993",
SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]],
TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
AUTHORITY["EPSG","6171"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4171"]],
PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]],
PARAMETER["central_meridian", 3.0],
PARAMETER["latitude_of_origin", 45.0],
PARAMETER["standard_parallel_1", 45.75],
PARAMETER["false_easting", 1700000.0],
PARAMETER["false_northing", 4200000.0],
PARAMETER["scale_factor", 1.0],
PARAMETER["standard_parallel_2", 44.25],
UNIT["m", 1.0],
AXIS["Easting", EAST],
AXIS["Northing", NORTH],
AUTHORITY["EPSG","3945"]]-->
<LatLonBoundingBox minx="6.743" miny="55.159" maxx="6.786" maxy="55.197"/>
<BoundingBox SRS="EPSG:3945" minx="2915613.875" miny="5221483.0" maxx="2918845.75" maxy="5225559.5"/>
<Style>
<Name>Type_antenna</Name>
<Title>Default Polygon</Title>
<Abstract>A sample style that draws a polygon</Abstract>
<LegendURL width="20" height="20">
<Format>image/png</Format>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.1.1:80/geoserver/mynamespace/wms?request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=antennas"/>
</LegendURL>
</Style>
</Layer>
<Layer queryable="1">
<Name>mynamespace:cellular</Name>
<Title>cellular</Title>
<Abstract/>
<KeywordList/>
<SRS>EPSG:3945</SRS>
<!--WKT definition of this CRS:
PROJCS["RGF93 / CC45",
GEOGCS["RGF93",
DATUM["Reseau Geodesique Francais 1993",
SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]],
TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
AUTHORITY["EPSG","6171"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4171"]],
PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]],
PARAMETER["central_meridian", 3.0],
PARAMETER["latitude_of_origin", 45.0],
PARAMETER["standard_parallel_1", 45.75],
PARAMETER["false_easting", 1700000.0],
PARAMETER["false_northing", 4200000.0],
PARAMETER["scale_factor", 1.0],
PARAMETER["standard_parallel_2", 44.25],
UNIT["m", 1.0],
AXIS["Easting", EAST],
AXIS["Northing", NORTH],
AUTHORITY["EPSG","3945"]]-->
<LatLonBoundingBox minx="6.743" miny="55.159" maxx="6.788" maxy="55.197"/>
<BoundingBox SRS="EPSG:3945" minx="2915596.25" miny="5221417.5" maxx="2919015.125" maxy="5225579.0"/>
<Style>
<Name>cellular</Name>
<Title>cellular</Title>
<Abstract>A blue fill, solid black outline style</Abstract>
<LegendURL width="20" height="20">
<Format>image/png</Format>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://192.168.1.1:80/geoserver/mynamespace/wms?request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=cellular"/>
</LegendURL>
</Style>
</Layer>
</Layer>
</Capability>
</WMT_MS_Capabilities>
_______________________________________________
Mapbender_dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapbender_dev