<div>Each Layer needs to have a Class and each class that you want to appear in the legend needs a NAME field.</div>
<div> </div>
<div>LAYER </div>
<div>   NAME "Streets"</div>
<div> CLASS</div>
<div>     NAME "Major Roads"</div>
<div>     STYLE.... etc..</div>
<div> </div>
<div> </div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 7/2/08, <b class="gmail_sendername">Ragnar Østerø</b> <<a href="mailto:ragnar@munin.fo">ragnar@munin.fo</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="DA" vlink="purple" link="blue">
<div>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have created a map view with mapscript and I want an embedded legend with layer names.</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">And this only gives me an empty image….</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$imageLegend = $objMap->drawLegend();</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$imageLegend_url = $imageLegend->saveWebImage();</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Do I have to set anything in the Layers or the map?</span></font></p></div></div><br>_______________________________________________<br>
mapserver-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></blockquote></div><br>