- Updates docs/ogcserver/readme.txt
- Added GetCapabilities named style support to 1.1.1
This commit is contained in:
parent
ab7d66ee8c
commit
30d930c709
2 changed files with 15 additions and 2 deletions
|
@ -167,6 +167,16 @@ class ServiceHandler(WMSBaseServiceHandler):
|
||||||
layere.append(layertitle)
|
layere.append(layertitle)
|
||||||
layere.append(latlonbb)
|
layere.append(latlonbb)
|
||||||
layere.append(layerbbox)
|
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)
|
rootlayerelem.append(layere)
|
||||||
|
|
||||||
self.capabilities = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n' + ElementTree.tostring(capetree)
|
self.capabilities = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n' + ElementTree.tostring(capetree)
|
||||||
|
|
|
@ -101,7 +101,8 @@ class WMSFactory(BaseWMSFactory):
|
||||||
|
|
||||||
lyr = Layer(name='layername')
|
lyr = Layer(name='layername')
|
||||||
...
|
...
|
||||||
self.register_layer(lyr)
|
self.register_layer(lyr, ('extra', 'style', 'names'))
|
||||||
|
self.finalize()
|
||||||
|
|
||||||
The rules for writing this class are:
|
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
|
- style and layer names are meant for machine readability, not human. Keep
|
||||||
them short and simple, without spaces or special characters.
|
them short and simple, without spaces or special characters.
|
||||||
- The layers must have at least one style associated with them (a default).
|
- 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.
|
Loading…
Reference in a new issue