[mapserver-users] Expressions

ibrahim saricicek ibrahimsaricicek at gmail.com
Wed Oct 6 04:29:53 EDT 2010


Hi List,

Thanks, that works.
But *this doesn't* and I need something like in the Class definitions below.
What should I do in this condition?
Is it about this; http://trac.osgeo.org/mapserver/ticket/2817
Using ms4w 5.4.0-rc2.

 CLASSITEM "name"

  CLASS
            EXPRESSION ([id] = 5)
            MAXSCALEDENOM 4000
            MINSCALEDENOM 1000
            NAME "1"
            STYLE
                COLOR [color2]
            END
            STYLE
                OUTLINECOLOR 20 20 20
                WIDTH 3
            END
        END

CLASS
            EXPRESSION /xyz/
            NAME "2"
                STYLE
                OUTLINECOLOR 0 0 0
                WIDTH 20
            END
        END

*OR*

#CLASSITEM 'name' # Without CLASSITEM definition
CLASS
            EXPRESSION ('[name]' eq /xyz/ AND [id] = 5)
            NAME "GID_S"
                STYLE
                OUTLINECOLOR 0 0 0
                WIDTH 20
            END
        END

On Tue, Oct 5, 2010 at 8:08 PM, Lime, Steve D (DNR)
<Steve.Lime at state.mn.us>wrote:

> You can use regular expressions instead. E.g.
>
> Classitem 'name'
> Class
>  Expression /xyz/
> End
>
> Steve
>
> ________________________________________
> From: mapserver-users-bounces at lists.osgeo.org [
> mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ibrahim Saricicek [
> ibrahimsaricicek at gmail.com]
> Sent: Tuesday, October 05, 2010 8:08 AM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] Expressions
>
> Hi List;
>
> instead of an sql ,in the connection string including 'LIKE';
> (select id, name,the_geom from public.mytable where name like '%xyz%')
> I would like to use an expression.
> But documents say "The following logical operators are supported:
> =,>,<,<=,>=,=,or,and,lt,gt,ge,le,eq,ne"
>
> How can I use something like this?
>  CLASS
>    EXPRESSION ([name]  like '%xyz%')
>
> Thanks in Advance...
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Expressions-tp5603053p5603053.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/20101006/6c7107b2/attachment-0001.html


More information about the mapserver-users mailing list