[Users] WMS legend quality

Jacinto Estima jacinto.estima at gmail.com
Tue Aug 14 22:06:33 CEST 2012


Thanks Thomas.

 

Just one quick question, should I need the hole geoext or the replacement of
the WMSLegend.js file it’s enough?

 

Regards,

Jacinto

 

From: Thomas Colley [mailto:it087 at neath-porttalbot.gov.uk] 
Sent: Tuesday, August 14, 2012 5:30 PM
To: Alexandre Dubé; Jacinto Estima
Cc: GeoEXT Users
Subject: RE: [Users] WMS legend quality

 

Hi Jacinto

 

This is a bug in GeoExt where the gif format was appended to the URL before
checking whether a format had been already specified.

 

If you download the most recent GeoExt source it has been fixed but there
hasn’t been a release since.

 

Hope this helps

 

Tom

 


On 12-08-14 08:29 AM, Jacinto Estima wrote:

Thanks Alexandre. I already have this configuration for png format, but I
still get the labels in the legend with very bad quality. I don’t know if I
am doing something wrong.

My LegendPanel is inside an Ext.Window. My code is:

 

var open_legend = new Ext.Button({

        text: 'Legend',

        icon: "images/legend.png",

        tooltip: "Show the legend of the active layer",

        handler: function(record){

              legend = new Ext.Window({

              title: "Layer legend",

              aligned: top,

              autoWidth: true,

              autoHeight: true,

              x: 350,

              y: 150,

              items: [new GeoExt.LegendPanel({

                     dynamic: false,

                     filter: function(record) {

                           SelectedLayer =
record.get("layer").name.indexOf(activeLayerNode) !== -1;

                           return SelectedLayer;

                     },

                     defaults: {

                            legendTitle: activeLayerNode,

                                  style: 'padding:5px',

                                  baseParams: {

                                                FORMAT: 'image/png',

                                                }

                                  }

                     })

                     ]

       }),

              legend.show();

        }

    });

    

       var left_toolbar = new Ext.Toolbar([open_legend]);

 

From: users-bounces at geoext.org [mailto:users-bounces at geoext.org] On Behalf
Of Alexandre Dubé
Sent: Tuesday, August 14, 2012 4:13 PM
To: users at geoext.org
Subject: Re: [Users] WMS legend quality

 

Hi,

  Yes, there is.  The default MIME type is image/gif.  You can change it
using the baseParams config of your LegendPanel object.  See :
 
https://github.com/geoext/geoext/blob/master/lib/GeoExt/widgets/WMSLegend.js
#L54

HTH,

Alexandre

Jacinto Estima  <mailto:jacinto.estima at gmail.com> <jacinto.estima at gmail.com>
On 12-08-14 06:37 AM, Jacinto Estima wrote:

Hi,

 

Is there a way to improve the quality of the legend that comes with the
GeoExt.LegendPanel request? I am receiving it but the quality is not very
nice.

 

Regards,

Jacinto






_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users






-- 
Alexandre Dubé
Mapgears
www.mapgears.com





-- 
Alexandre Dubé
Mapgears
www.mapgears.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120815/2faf977a/attachment.htm 


More information about the Users mailing list