<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Paul, <br>
we had a similar problem using GeoWebCache. You need to define a url
where the legend can be found at. in the example below we put a
GetLegendGraphic request to the WMS layer in as the URL. <br>
<br>
Here's the workaround I posted a while back:<br>
This is relevant when using
the GeoWebCache that is built-in to GeoServer 2.0.1, and the GeoExt
legendPanel. It might be relevant in other situations as well.<br>
<br>
Use the mapPanel.layers.layer Set legendURL method to manually define
the wms getLegendGraphic parameter<br>
<br>
I found the example at <a
href="http://dev.geoext.org/trunk/geoext/examples/legendpanel.js">http://dev.geoext.org/trunk/geoext/examples/legendpanel.js</a><br>
<br>
here's a snippet of my code:<br>
//<br>
var LayerRec = mapPanel.layers.getAt(3);<br>
LayerRec.set("legendURL",<a class="moz-txt-link-rfc2396E"
href="http://something.com/geoserver/wms?FORMAT=image/gif&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&EXCEPTIONS=application/vnd.ogc.se_xml&LAYER=medford:schools">"http://something.com/geoserver/wms?FORMAT=image/gif&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&EXCEPTIONS=application/vnd.ogc.se_xml&LAYER=medford:schools"</a>);<br>
<br>
//<br>
I'm manually setting the index in "getAt(3)" to the 4th layer added to
my map. I haven't learned the proper syntax yet to get that index using
layer name, but I'm sure it can be done; just need to study more. <br>
<br>
Ryan<br>
<br>
On 5/12/2010 11:10 AM, Paul james wrote:
<blockquote
cite="mid:AANLkTimqKOjGK2EyA5hZKNoypqy-83nPtnmKPaGbppGz@mail.gmail.com"
type="cite">Thanks...<br>
Is there any config to set tilecache off to legend? <br>
<br>
Paul<br>
<br>
<div class="gmail_quote">On Wed, May 12, 2010 at 1:03 PM, Christopher
Schmidt <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:crschmidt@crschmidt.net">crschmidt@crschmidt.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div class="h5">On Wed, May 12, 2010 at 12:52:47PM -0300, Paul
james wrote:<br>
> Hello guys...<br>
><br>
> Without Tilecache the LegendPanel works fine, but using the image
doesnt<br>
> appear...<br>
> Any ideia?<br>
<br>
</div>
</div>
TileCache doesn't do legend graphics, so if you're trying to talk<br>
to TileCache to request an image other than a tile, you're going to<br>
be out of luck.<br>
<br>
Regards,<br>
<font color="#888888">--<br>
Christopher Schmidt<br>
Web Developer<br>
</font></blockquote>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@geoext.org">Users@geoext.org</a>
<a class="moz-txt-link-freetext" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
107 S State St., Suite 300
Monticello, IL 61856-1968
Office: (217) 762-7955
Mobile: (217) 722-2794
<a class="moz-txt-link-abbreviated" href="mailto:rwilliams@paqinteractive.com">rwilliams@paqinteractive.com</a></pre>
</body>
</html>