[mapserver-users] Use of wms_style_default_legendurl_href parameter

Pierre GIRAUD bluecarto at gmail.com
Wed Jun 12 01:44:23 PDT 2013


Hi all,

I'm encountering the same problem.

What happens actually is that the capabilities tell that the online
resource for the legend points to the url I set in
"wms_style_[style’s_name]_legendurl_href".

[...]
<Style>
          <Name>MyStyle</Name>
          <Title>MyStyle</Title>
          <LegendURL width="256" height="256">
             <Format>image/png</Format>
             <OnlineResource
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:href="http://path.to/the_image.png"/>
          </LegendURL>
        </Style>
[...]

However, when querying the layer's legend with a standard
GetLegendGraphic request, the legend image is still generated by
Mapserver.
Is it on purpose? Is the client supposed to read the capabilities to
ensure that it asks for the correct legend?

Thanks,
Pierre


On Fri, Oct 28, 2011 at 2:17 PM, Yves Jacolin
<yves.jacolin at camptocamp.com>wrote:

> Hello,
>
> I am trying to use wms_style_default_legendurl_href parameter (with his
> little
> friends wms_style, wms_style_default_legendurl_width and height).
>
> The GetLegendGraphic request is not working (I get wrong legend), log
> doesn't
> show anything event if I set up DEBUG 5 in mapfile.
>
> The layer used is a vector layer with one class. The legend showed is the
> legend of the class, not the one from the url of
> wms_style_default_legendurl_href.
>
> Some parts of the MapFile:
> /**********
>   LEGEND
>       STATUS ON
>       KEYSIZE 18 12
>       LABEL
>           FONT Vera
>           TYPE truetype
>           SIZE 8
>           COLOR 0 0 89
>       END
>   END
>
>   LAYER
>     NAME departement
>     TYPE POLYGON
>     STATUS ON
>     DATA geoFla
>     TEMPLATE foo
>     DUMP true
>     DEBUG 5
>     CLASS
>       NAME "Départements"
>       STYLE
>         WIDTH 1
>         OUTLINECOLOR  0 0 0
>         COLOR   255 255 192
>       END
>     END
>     METADATA
>       "wms_title"    "Département"   ##required
>       "wms_srs" "EPSG:27572"
>        wms_name "Departement"
>        wms_server_version "1.1.1" #obligatoire
>        wms_style "default"
>        wms_style_default_legendurl_height "37"
>        wms_style_defaultDEFAULT_width "264"
>        wms_style_default_legendurl_format "image/png"
>        wms_style_default_legendurl_href
> "http://yjacolin.meije/ifremer/legende_chla.png"
>     END
>   END
> ***********/
>
> Any idea?
>
> Y.
> --
> Responsable Formation et Support
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel (France) : +33 4 79 26 57 98
> Tel (Suisse) : +41 21 619 1031
> Mob. : +33 6 18 75 42 21
> Fax : 04 79 70 15 81
> Mail : yves.jacolin at camptocamp.com
> http://www.camptocamp.com
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
Pierre GIRAUD
http://www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130612/ae7ef19d/attachment.html>


More information about the mapserver-users mailing list