I thought you have a the color value itself as the attribute.<br>But if you'd categorize by a different value you might want to define a different class for each value, something like<br><br>LAYER<br> CLASS<br> EXPRESSION ([MYCOLORATTRIBUTE]=1)<br>
STYLE<br> COLOR 255 255 0<br> END<br> END<br> CLASS<br>
EXPRESSION ([MYCOLORATTRIBUTE]=2)<br>
STYLE<br>
COLOR 255 0 0<br>
END<br>
END<br>END<br><br><br>Best regards,<br><br>Tamas<br><br><br><div class="gmail_quote">2009/9/20 truongpm <span dir="ltr"><<a href="mailto:truong_pham_minh@yahoo.com">truong_pham_minh@yahoo.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
But how could i get the value of polygon from database and set condition in<br>
mapfile. As i image, in mapfile will folowing:<br>
<br>
if(value==1){<br>
//layout with another color<br>
}<br>
else if{}<br>
...<br>
<br>
I had just found some document about PHPMapscript but not success!<br>
<br>
Thanks for your help!<br>
<div class="im"><br>
<br>
Tamas Szekeres wrote:<br>
><br>
> Hi,<br>
><br>
> This sounds like the style attribute binding would be a good option to<br>
> achieve this. For more information see:<br>
> <a href="http://mapserver.org/mapfile/style.html" target="_blank">http://mapserver.org/mapfile/style.html</a><br>
><br>
> I you mapfile you'd do something loke<br>
><br>
><br>
> STYLE<br>
> COLOR [MYCOLORATTRIBUTE]<br>
> ...<br>
> END<br>
><br>
><br>
<br>
</div><font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/Is-mapserver-possible-to-dynamic-layout-tp3680865p3681037.html" target="_blank">http://n2.nabble.com/Is-mapserver-possible-to-dynamic-layout-tp3680865p3681037.html</a><br>
</font><div><div></div><div class="h5">Sent from the Mapserver - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></div></blockquote></div><br>