<div dir="ltr">Hi guys,<div><br></div><div>I've made a small change to the WmsLegend class and now it works perfectly.</div><div>I've just added the following code inside the getLegendUrl method (at line 145):</div><div><br></div><div><div>if (rec.get('legendURL') != ''){</div><div> url = rec.get('legendURL');</div><div>}</div></div><div><br></div><div>Obviously this assumes that if legendURL is different than an empty strig, it will override the url returned by the styles definition.</div><div><br></div><div>Cheers,</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-28 19:13 GMT+00:00 Hugo <span dir="ltr"><<a href="mailto:hfpmartins@gmail.com" target="_blank">hfpmartins@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm building a tree panel similar to the example LegendTree. So far so good, I'm able to use gx_wmslegend ctype to show the legend below each node in the tree.</div><div>However there is a case where i need to override the legendURL and point it to a specific image instead of using the default GetLegendGraphic.</div><div><br></div><div>I have sucessfully implemented this override in a GeoExt.panel.Legend by "manually" seting the layer record legendurl field [eg: layerRec.set("legendURL", rec.data.legURL);]</div><div><br></div><div>When trying the same approach on th gx_wmslegend it doesn't work. I was reading through the docs of this xtype and it states that <span style="color:rgb(72,72,72);font-family:HelveticaNeue,helvetica,arial,clean,sans-serif;font-size:13px;line-height:19.5px">the image can be read from the styles field of a layer record</span></div><div><br></div><div>When looking at the layerModel i cannot see this field defined. So my question would be, where should i set this styles field? GeoExt layer record? Openlayers layer record? How would it look like?</div><div><br></div><div>Thanks in advance.</div><div>Cheers,</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><div><br></div>-- <br>Hugo Martins<br>
</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Hugo Martins<br>
</div>