Thanks Ryan...<br><br>But I found other solution...<br>I edited the setUrl method from LegendImage.Js...<br><br>Before<br> setUrl: function(url) {<br> this.url = url; <br> var el = this.getEl();<br> if (el) {<br>
el.un("error", this.onImageLoadError, this);<br> el.on("error", this.onImageLoadError, this, {single: true});<br> el.dom.src = url;<br> }<br> },<br><br><br>My modification<br>
setUrl: function(url) { <br> this.url = url.replace("tilecache.py?","<a href="http://localhost/cgi-bin/mapserv.exe?map=Map.map&">http://localhost/cgi-bin/mapserv.exe?map=Map.map&</a>");<br>
<br> var el = this.getEl();<br> if (el) {<br> el.un("error", this.onImageLoadError, this);<br> el.on("error", this.onImageLoadError, this, {single: true});<br>
el.dom.src = this.url;<br> }<br> },<br><br><br>Worked fine!<br><br>Thanks <br><br><br><div class="gmail_quote">On Wed, May 12, 2010 at 1:30 PM, Ryan Williams <span dir="ltr"><<a href="mailto:rwilliams@paqinteractive.com">rwilliams@paqinteractive.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div 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" target="_blank">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 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" target="_blank">"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<div><div></div><div class="h5"><br>
<br>
On 5/12/2010 11:10 AM, Paul james wrote:
</div></div><blockquote type="cite"><div><div></div><div class="h5">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 href="mailto:crschmidt@crschmidt.net" target="_blank">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>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>
</div></div><pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a>
<a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<pre 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
<font color="#888888"><a href="mailto:rwilliams@paqinteractive.com" target="_blank">rwilliams@paqinteractive.com</a></font></pre>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@geoext.org">Users@geoext.org</a><br>
<a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br>