justb4 / geoext-viewer

Automatically exported from code.google.com/p/geoext-viewer
GNU General Public License v3.0
0 stars 0 forks source link

ArcGIS WMS - GetLegentGraphic - #418

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Use this steps to reporduce the problem

1. Try to use ArcGIS Server WMS from gxp_addlayers - for example: 
http://gis.azo.hr/gisapp/services/AZO_PublicData/Crne_Tocke/MapServer/WmsServer
2. Add some WMS layer to map
3. The Legend is not shown in layertree

Whwn adding layers to layertree the getLegendGraphic request contains two 
"format" parameters: one from layer definition, and one from GetLegendGraphic 
definition. For example:

http://gis.azo.hr/gisapp/services/AZO_PublicData/Crne_Tocke/MapServer/WmsServer?
request=GetLegendGraphic%26version=1.1.1%26format=image/png%26layer=0&transparen
t=true&format=image%2Fpng&legend_options=fontAntiAliasing%3Atrue%3BfontSize%3A11
%3BfontName%3AArial&SCALE=10000

For some reason ArcGIS WMS returns "Can't parse XML request". When I delete one 
of "format" parameters I get a proper response:

http://gis.azo.hr/gisapp/services/AZO_PublicData/Crne_Tocke/MapServer/WmsServer?
request=GetLegendGraphic%26version=1.1.1%26layer=0&transparent=true&format=image
%2Fpng&legend_options=fontAntiAliasing%3Atrue%3BfontSize%3A11%3BfontName%3AArial
&SCALE=10000

I tried with several ArcGIS servers. So i think this is not instance specific 
problem. Geoserver doesn't complain about this, but I think the optimal 
solution would be to use just "Layer" parameter from Layer definiton, not other 
"GetMap" parameters.

Can anyone confirm this?

Original issue reported on code.google.com by davor.ra...@gmail.com on 23 Apr 2015 at 12:51

GoogleCodeExporter commented 9 years ago
Yes, I can confirm this: the problem is that format=image/png is added twice in 
the GetLegendGraphic request when opening the LayerLegendPanel after adding a 
Layer. Not in the catalog (see picture), only in the LayerLegendPanel. Some 
servers may be resilient.  GeoServer has a "strict OGC" setting which is often 
turned off. But this is a bug as it is illegal within the WMS protocol.

Original comment by jus...@gmail.com on 23 Apr 2015 at 3:31

Attachments: