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