[MapProxy] Legend for group layer

Marcel Radischat m.radischat at datalyze-solutions.com
Thu Jul 16 02:55:57 PDT 2015


Hello Stephan,

it looks like the method is not implemented right now for group layers and since there is not test for this
as well, it most certainly is a bug.

I would suggest to disable the legend graphic for group layers right now until a fix is deployed.

Regards,
Marcel

> On 16 Jul 2015, at 11:06, mapproxy-request at lists.osgeo.org wrote:
> 
> Date: Thu, 16 Jul 2015 08:50:15 +0000
> From: "Klemm, Stephan - LIST" <Stephan.Klemm at list.smwa.sachsen.de>
> To: "'mapproxy at lists.osgeo.org'" <mapproxy at lists.osgeo.org>
> Subject: [MapProxy] Legend for group layer
> Message-ID:
> 	<5A21763885B5424F87CF9D046CF385C32230A6 at LIST-XC-04.smwa.sachsen.de>
> Content-Type: text/plain; charset="us-ascii"
> 
> 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.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.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-0001.jpg>
> 
> ------------------------------
> 
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapproxy
> 
> End of MapProxy Digest, Vol 65, Issue 3
> ***************************************

——
Datalyze Solutions UG
Urbanstr. 116 | 10967 Berlin

Marcel Radischat | m.radischat at datalyze-solutions.com




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20150716/bde8ec28/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20150716/bde8ec28/attachment.pgp>


More information about the MapProxy mailing list