[MapProxy] Legend for group layer

Klemm, Stephan - LIST Stephan.Klemm at list.smwa.sachsen.de
Thu Jul 16 01:50:15 PDT 2015


Dear Community,

we use MapProxy 1.8.0 and have build some group layer as described in the documentation<http://mapproxy.org/docs/nightly/configuration.html#layers>. Now we have an understanding problem.

Here an excerpt from the yaml:
layers:
  - name: SachsenNetz Rad (SNR)
    title: SachsenNetz Rad (Layergruppe)
    layers:
      - name: Radfernwege
        title: SNR Radfernwege
        layers:
          - name: RFW Bestand
            title: RFW Bestand
            sources: ['rvk_wms_rfw:Radfernwege_Bestand']
          - name: RFW Mangelhaft
            title: RFW mangelhaft
            sources: ['rvk_wms_rfw:Radfernwege_Mangelhaft']
          - name: RFW Planung
            title: RFW Planung
            sources: ['rvk_wms_rfw:Radfernwege_Planung']
      - name: Regionale Hauptradrouten
        title: SNR Regionale Hauptradrouten
        layers:
          - name: HRR Bestand
            title: HRR Bestand
            sources: ['rvk_wms_hrr:Regionale_Hauptradrouten_Bestand']
          - name: HRR Mangelhaft
            title: HRR mangelhaft
            sources: ['rvk_wms_hrr:Regionale_Hauptradrouten_Mangelhaft']
          - name: HRR Planung
            title: HRR Planung
            sources: ['rvk_wms_hrr:Regionale_Hauptradrouten_Planung']
      - name: Sonstige Strecken
        title: SNR Sonstige Strecken
        layers:
          - name: SoS Bestand
            title: SoS Bestand
            sources: ['rvk_wms_sos:Sonstige_Strecken_Bestand']
          - name: SoS Mangelhaft
            title: SoS mangelhaft
            sources: ['rvk_wms_sos:Sonstige_Strecken_Mangelhaft']
          - name: SoS Planung
            title: SoS Planung
            sources: ['rvk_wms_sos:Sonstige_Strecken_Planung']

sources:      #( UMN MapServer as WMS)
   rvk_wms_rfw:
    type: wms
    wms_opts:
      featureinfo: true
      legendgraphic: true
    req:
      url: server?
      layers: Radfernwege_Planung,Radfernwege_Mangelhaft,Radfernwege_Bestand
      transparent: true
   rvk_wms_hrr:
    type: wms
    wms_opts:
      featureinfo: true
      legendgraphic: true
    req:
      url: server?
      layers: Regionale_Hauptradrouten_Planung,Regionale_Hauptradrouten_Mangelhaft,Regionale_Hauptradrouten_Bestand
      transparent: true
   rvk_wms_sos:
    type: wms
    wms_opts:
      featureinfo: true
      legendgraphic: true
    req:
      url: server?
      layers: Sonstige_Strecken_Planung,Sonstige_Strecken_Mangelhaft,Sonstige_Strecken_Bestand
      transparent: true


When I activate the layer in QGIS everything looks great:
[cid:image002.jpg at 01D0BFB5.32AABB20]

But: when I tried to do an request to the layer group "SachsenNetz Rad" the legend does not appear and get an error on the apache log. The legend for the layer "RFW Bestand" is shown as needed.
[cid:image005.jpg at 01D0BFB5.32AABB20]

apache error message:
File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/wms.py", line 306, in legendgraphic
legend = self.layers[layer].legend(request)

File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/wms.py", line 632, in legend
raise NotImplementedError()
NotImplementedError


Thank you very much in advance for your help.

Regards,
Stephan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20150716/bf6097c3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 26825 bytes
Desc: image002.jpg
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20150716/bf6097c3/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.jpg
Type: image/jpeg
Size: 6828 bytes
Desc: image005.jpg
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20150716/bf6097c3/attachment-0003.jpg>


More information about the MapProxy mailing list