[mapserver-users] Is mapserver possible to dynamic layout

Tamas Szekeres szekerest at gmail.com
Sun Sep 20 14:00:07 EDT 2009


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 <truong_pham_minh at yahoo.com>

>
> 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
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090920/b56f997d/attachment.html


More information about the mapserver-users mailing list