Thanks again...<br>I have 3 layers, each one has several sublayers.... :<br>OpenLayers.Layer.WMS(&quot;Layer1&quot;, ...<br>OpenLayers.Layer.WMS(&quot;Layer2&quot;,<br>OpenLayers.Layer.WMS(&quot;Layer3&quot;,<br>But my legend only prints one Label (&quot;Layer1&quot;) .... None imagens at all... And just for the first layer...<br>
<br> var legendPanel = new GeoExt.LegendPanel({<br>        defaults: {           <br>            style: &#39;padding:5px&#39;            <br>        },<br>        title: &#39;Legend&#39;,<br>        bodyStyle: &#39;padding:5px&#39;,<br>
        width: 350,<br>        autoScroll: true      <br>    });<br><br><br>Is there anything else to implement ? Maybe in mapfile?<br><br>Stella<br><br><br><br><div class="gmail_quote">2010/1/6 Andreas Hocevar <span dir="ltr">&lt;<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On 2010-01-06 18:00, stela anders wrote:<br>
&gt; Yeah! Thats it Andreas!<br>
&gt;<br>
&gt; That LegendPanel works with sublayers? I´m a little bit confused right<br>
&gt; now!<br>
<br>
</div>The LegendPanel currently supports one image per layer. GeoServer&#39;s<br>
GetLegendGraphic e.g. returns images with symbols and text for all rules<br>
of the SLD that was used to render the layer. I think the same is true<br>
for MapServer, but maybe a MapServer user can give more detail about<br>
what its GetLegendGraphic returns.<br>
<br>
Regards,<br>
Andreas.<br>
<div class="im"><br>
<br>
&gt;<br>
&gt; Thanks !<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2010/1/6 Andreas Hocevar &lt;<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a><br>
</div><div><div></div><div class="h5">&gt; &lt;mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;&gt;<br>
&gt;<br>
&gt;     Hi,<br>
&gt;<br>
&gt;     make sure that your Ext JS build contains Ext.form.Label, or use a<br>
&gt;     full<br>
&gt;     build. The build that most of the GeoExt exmaples use<br>
&gt;     (<a href="http://extjs.cachefly.net/builds/ext-cdn-771.js" target="_blank">http://extjs.cachefly.net/builds/ext-cdn-771.js</a>) does not contain it.<br>
&gt;     Look e.g. at<br>
&gt;     <a href="http://dev.geoext.org/trunk/geoext/examples/legendpanel.html" target="_blank">http://dev.geoext.org/trunk/geoext/examples/legendpanel.html</a>, it<br>
&gt;     uses a<br>
&gt;     full build.<br>
&gt;<br>
&gt;     Regards,<br>
&gt;     Andreas.<br>
&gt;<br>
&gt;     On 2010-01-06 16:24, stela anders wrote:<br>
&gt;     &gt; Thanks Andreas !!!!<br>
&gt;     &gt; I changed to WMS with success...<br>
&gt;     &gt; But now I got that error when trying to generate the legend :<br>
&gt;     &gt;<br>
&gt;     &gt; Error: Ext.form.Label is not a constructor<br>
&gt;     &gt; Arquivo-fonte:<br>
&gt;     &gt;<br>
&gt;     <a href="http://localhost/Openlayer/Arquivos/geoextx/lib/GeoExt/widgets/LegendPanel.js" target="_blank">http://localhost/Openlayer/Arquivos/geoextx/lib/GeoExt/widgets/LegendPanel.js</a><br>
&gt;     &gt; Linha: 293<br>
&gt;     &gt;<br>
&gt;     &gt; Am I suppossed to change anything?<br>
&gt;     &gt;<br>
&gt;     &gt; Thanks<br>
&gt;     &gt;<br>
&gt;     &gt; Stella<br>
&gt;     &gt;<br>
&gt;     &gt; 2010/1/5 Andreas Hocevar &lt;<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a><br>
&gt;     &lt;mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;<br>
</div></div>&gt;     &gt; &lt;mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a> &lt;mailto:<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;&gt;&gt;<br>
<div><div></div><div class="h5">&gt;     &gt;<br>
&gt;     &gt;     Hi,<br>
&gt;     &gt;<br>
&gt;     &gt;     On 2010-01-04 19:36, stela anders wrote:<br>
&gt;     &gt;     &gt; Is it possible?<br>
&gt;     &gt;<br>
&gt;     &gt;     You have at least two choices:<br>
&gt;     &gt;<br>
&gt;     &gt;     (1) Use Layer.WMS instead of Layer.MapServer. With minor<br>
&gt;     modifications<br>
&gt;     &gt;     to your mapfile, it is easy to use MapServer as WMS (see<br>
&gt;     &gt;     <a href="http://mapserver.org/ogc/wms_server.html" target="_blank">http://mapserver.org/ogc/wms_server.html</a>). I think this is<br>
&gt;     the best<br>
&gt;     &gt;     option, because it will build the legend automatically from<br>
&gt;     &gt;     GetLegendGraphic requests.<br>
&gt;     &gt;<br>
&gt;     &gt;     (2) Use a LayerStore with a legendURL field. For each layer, you<br>
&gt;     &gt;     have to<br>
&gt;     &gt;     provide a URL that points to a legend image. This option may<br>
&gt;     only work<br>
&gt;     &gt;     with the current trunk version of GeoExt, not with v0.6.<br>
&gt;     &gt;<br>
&gt;     &gt;     Regards,<br>
&gt;     &gt;     Andreas.<br>
&gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; I tried to create that :<br>
&gt;     &gt;     &gt;   var legendPanel = new GeoExt.LegendPanel({<br>
&gt;     &gt;     &gt;             title: &#39;Legend&#39;,<br>
&gt;     &gt;     &gt;             dynamic: true<br>
&gt;     &gt;     &gt;      });<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; And added to Viewport, but nothing is created...<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; Help me please!<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; _______________________________________________<br>
&gt;     &gt;     &gt; Users mailing list<br>
&gt;     &gt;     &gt; <a href="mailto:Users@geoext.org">Users@geoext.org</a> &lt;mailto:<a href="mailto:Users@geoext.org">Users@geoext.org</a>&gt;<br>
</div></div>&gt;     &lt;mailto:<a href="mailto:Users@geoext.org">Users@geoext.org</a> &lt;mailto:<a href="mailto:Users@geoext.org">Users@geoext.org</a>&gt;&gt;<br>
<div class="im">&gt;     &gt;     &gt; <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;     --<br>
&gt;     &gt;     Andreas Hocevar<br>
&gt;     &gt;     OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
&gt;     &gt;     Expert service straight from the developers.<br>
&gt;     &gt;<br>
&gt;     &gt;     _______________________________________________<br>
&gt;     &gt;     Users mailing list<br>
&gt;     &gt;     <a href="mailto:Users@geoext.org">Users@geoext.org</a> &lt;mailto:<a href="mailto:Users@geoext.org">Users@geoext.org</a>&gt;<br>
</div>&gt;     &lt;mailto:<a href="mailto:Users@geoext.org">Users@geoext.org</a> &lt;mailto:<a href="mailto:Users@geoext.org">Users@geoext.org</a>&gt;&gt;<br>
<div class="im">&gt;     &gt;     <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; _______________________________________________<br>
&gt;     &gt; Users mailing list<br>
</div><div class="im">&gt;     &gt; <a href="mailto:Users@geoext.org">Users@geoext.org</a> &lt;mailto:<a href="mailto:Users@geoext.org">Users@geoext.org</a>&gt;<br>
&gt;     &gt; <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;     &gt;<br>
&gt;<br>
&gt;<br>
&gt;     --<br>
&gt;     Andreas Hocevar<br>
&gt;     OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
&gt;     Expert service straight from the developers.<br>
&gt;<br>
&gt;<br>
<br>
<br>
</div>--<br>
<div><div></div><div class="h5">Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
<br>
</div></div></blockquote></div><br>