I updated GeoExt....<br>Worked fine now! <br><br>Thanks for the patience !<br><br>Stella<br><br><div class="gmail_quote">2010/1/11 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;">Hi,<br>
<br>
which version of GeoExt are you using? Providing imageFormat in defaults only works with current trunk. Version 0.6 had a different way of doing this.<br>
<br>
Regards,<br>
Andreas.<br>
<br>
stela anders wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks Andreas...<br>
<br><div class="im">
The fact is :<br>
 - Now I have all image symbol in png format<br>
 - My mapfile is configured to generate PNG images<br>
 - My legendPanel:<br>
<br>
var legendPanel = new GeoExt.LegendPanel({<br>
        defaults: {                      style: &#39;padding:5px&#39;,<br>
            imageFormat: &quot;image/png&quot;           },<br>
        title: &#39;Legend&#39;,<br>
        bodyStyle: &#39;padding:5px&#39;,<br>
        width: 350,<br>
        autoScroll: true         });<br>
<br>
<br>
But the legend url generated my GeoExt is:<br>
<br>
</div><a href="http://localhost/cgi-bin/mapserv.exe?MAP=Map.map&amp;TRANSPARENT=true&amp;FORMAT=image%2Fgif&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetLegendGraphic&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_xml&amp;LAYER=Roads" target="_blank">http://localhost/cgi-bin/mapserv.exe?MAP=Map.map&amp;TRANSPARENT=true&amp;FORMAT=image%2Fgif&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetLegendGraphic&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_xml&amp;LAYER=Roads</a> &lt;<a href="http://localhost/cgi-bin/mapserv.exe?MAP=Map.map&amp;TRANSPARENT=true&amp;FORMAT=image%2Fgif&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetLegendGraphic&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_xml&amp;LAYER=Roads" target="_blank">http://localhost/cgi-bin/mapserv.exe?MAP=Map.map&amp;TRANSPARENT=true&amp;FORMAT=image%2Fgif&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetLegendGraphic&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_xml&amp;LAYER=Roads</a>&gt; <br>
<div class="im">
<br>
It is in GIF, why? If I manually change to &quot;...&amp;FORMAT=image%2Fpng&quot; the legend is generated fine...<br>
<br>
Any help?<br>
<br>
Thanks<br>
<br>
Stella<br>
<br></div><div class="im">
2010/1/8 Andreas Hocevar &lt;<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a> &lt;mailto:<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>&gt;&gt;<br>
<br>
    stela anders wrote:<br>
<br>
        Thanks Andreas... ;)<br>
        displayInLayerSwitcher did the trick !!!<br>
<br>
        I have some point layer with image symbol (.gif - 16x15) ... The<br>
        legend icon in that case stay ugly (only part of image appears)...<br>
<br>
<br>
    Not a GeoExt issue for sure. GeoExt just loads the image and<br>
    displays it in its original extent and dimensions. But you could<br>
    define a png24 format in your mapfile, and configure your<br>
    legendPanel with something like<br>
<br>
    defaults: {imageFormat: &quot;image/png&quot;}<br>
<br>
<br>
        Any idea why that? Or maybe is a restriction?<br>
<br>
<br>
    Again, you might want to ask about GetLegendGraphic on the mapserver<br>
    users list or look in the mapserver docs.<br>
<br>
    Regards,<br>
    Andreas.<br>
<br>
<br>
        Thanks so much! U r saving my week ;)<br>
<br>
        Stella<br>
<br>
        2010/1/8 Andreas Hocevar &lt;<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a><br></div>
        &lt;mailto:<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>&gt; &lt;mailto:<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a><div><div></div><div class="h5">
<br>
        &lt;mailto:<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>&gt;&gt;&gt;<br>
<br>
<br>
           stela anders wrote:<br>
<br>
               Hello Andreas...<br>
<br>
               All sublayers is with status ON, they are draw on map,<br>
        but in my<br>
               legend I got ONLY &quot;Layer1&quot; label printed...<br>
               My layers:<br>
                             OpenLayers.Layer.WMS(&quot;Layer1&quot;,<br>
                              mycgi, {<br>
                                  map: mymapfile,<br>
                                  layers: [&#39;Sublayer11&#39;,&#39;Sublayer12&#39;,<br>
               &#39;Sublayer13&#39;],<br>
                                  format: &quot;image/png&quot;,<br>
                                  transparent: &quot;true&quot;<br>
                              }, {<br>
                                  isBaseLayer: true,                                                    visibility: true<br>
                              }),<br>
<br>
<br>
           The above should cause three GetFeatureInfo requests to be<br>
        issued:<br>
           one for each of your sublayers. If you just see the label, then<br>
           MapServer does not send you an image on the GetFeatureInfo<br>
        request.<br>
           Here is what you can try: enable the Net panel on firebug and<br>
        look<br>
           at the GetFeatureInfo request that the browser issues. Copy them,<br>
           open them in a browser window/tab, and fix your mapfile until<br>
        they<br>
           work (more help available in mapserver docs/lists).<br>
<br>
<br>
                             OpenLayers.Layer.WMS(&quot;Layer2&quot;,<br>
                              mycgi, {<br>
                                  map: mymapfile,<br>
                                  layers: [&#39;Sublayer21&#39;,&#39;Sublayer22&#39;,<br>
               &#39;Sublayer23&#39;],<br>
                                  format: &quot;image/png&quot;,<br>
                                  transparent: &quot;true&quot;<br>
                              }, {<br>
                                  isBaseLayer: false,<br>
                                  displayInLayerSwitcher: false,<br>
                                  visibility: true<br>
                              }),<br>
<br>
<br>
           This won&#39;t display anything, because you have set<br>
           &quot;displayInLayerSwitcher&quot; to false.<br>
<br>
               So, What is your suggestion in building a legend to Map with<br>
               GeoExt sublayers? I need all sublayers appears on my legend<br>
               (each one has different images...)<br>
<br>
<br>
           The LegendPanel does exactly that. It requests one image per<br>
           sublayer (now that you provided a code snippet and I finally know<br>
           what you meant by &quot;sublayer&quot;). My suggestion is: fix your<br>
        mapfile so<br>
           Mapserver can answer GetFeatureInfo requests correctly.<br>
<br>
           Regards,<br>
           Andreas.<br>
<br>
           --    Andreas Hocevar<br>
           OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
           Expert service straight from the developers.<br>
<br>
<br>
<br>
<br>
    --     Andreas Hocevar<br>
    OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
    Expert service straight from the developers.<br>
<br>
<br>
</div></div></blockquote><div><div></div><div class="h5">
<br>
<br>
-- <br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
</div></div></blockquote></div><br>