[mapserver-users] GetLegendGraphic legend image generated as line for polygon without color

thomas bonfort thomas.bonfort at gmail.com
Wed Mar 7 04:35:32 PST 2012


c.f. http://trac.osgeo.org/mapserver/ticket/4104

here's an ugly hack that *should* work (not tested):

CLASS
  STYLE
    COLOR 0 0 0
    OPACITY 0
  END
  STYLE
    OUTLINECOLOR 255 0 0
    WIDTH 3
  END
END

On Wed, Mar 7, 2012 at 13:26, Oliver Christen
<oliver.christen at camptocamp.com> wrote:
> dear all
>
> Im trying to find a way to tell Mapserver to render the legend icon
> for a polygon layer with no color (transparent) (only outlinecolor) as
> a polygon legend (rectangle) and not as a line legend (zig-zag line)
>
> see below for my layer definition
>
> the currently generated legend image is:
> http://dev.camptocamp.com/files/mapserver/legend.png
>
> I have tried to specify a
> COLOR -1 -1 -1
> to force Mapserver to handle the legend image as a polygon (rectangle)
> without success.
>
> any idea if there is a "trick" to force Mapserver to render the legend
> as a rectangle and not as a zig-zag line ?
>
> thanks in advance
> Oliver
>
>  LAYER
>   NAME "movd_cad_tpr_prf_s"
>   METADATA
>     "wms_title" "SitCdParcellaireLineDDPtt2_"
>   END
>   TYPE POLYGON
>   DATA MOVD_CAD/MOVD_CAD_TPR_PRF_S
>   STATUS ON
>
>   MAXSCALE 10001
>
>   CLASS
>     NAME "Prf"
>     STYLE
>       OUTLINECOLOR 255 0 0
>       WIDTH 3
>     END
>   END
>  END
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the MapServer-users mailing list