[Users] WMS legend quality

Thomas Colley it087 at neath-porttalbot.gov.uk
Tue Aug 14 15:29:56 CEST 2012


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 <jacinto.estima at gmail.com> <mailto: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/20120814/42dd9bae/attachment-0001.htm 


More information about the Users mailing list