- Updates docs/ogcserver/readme.txt

- Added GetCapabilities named style support to 1.1.1
This commit is contained in:
Jean-Francois Doyon 2006-04-21 00:18:07 +00:00
parent ab7d66ee8c
commit 30d930c709
2 changed files with 15 additions and 2 deletions

View file

@ -167,6 +167,16 @@ class ServiceHandler(WMSBaseServiceHandler):
layere.append(layertitle)
layere.append(latlonbb)
layere.append(layerbbox)
if len(layer.wmsextrastyles) > 0:
for extrastyle in list(layer.wmsextrastyles):
style = ElementTree.Element('Style')
stylename = ElementTree.Element('Name')
stylename.text = extrastyle
styletitle = ElementTree.Element('Title')
styletitle.text = extrastyle
style.append(stylename)
style.append(styletitle)
layere.append(style)
rootlayerelem.append(layere)
self.capabilities = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n' + ElementTree.tostring(capetree)

View file

@ -101,7 +101,8 @@ class WMSFactory(BaseWMSFactory):
lyr = Layer(name='layername')
...
self.register_layer(lyr)
self.register_layer(lyr, ('extra', 'style', 'names'))
self.finalize()
The rules for writing this class are:
@ -112,4 +113,6 @@ The rules for writing this class are:
- style and layer names are meant for machine readability, not human. Keep
them short and simple, without spaces or special characters.
- The layers must have at least one style associated with them (a default).
- No Map() object is used or needed here.
- No Map() object is used or needed here.
- Be sure to call self.finalize() once you've registered everything! This will
validate everything and let you know if there's problems.