[Mapserver-users] modify layer attributes in runtime and change map output

Thorsten Fischer thfischer at mapmedia.de
Tue Jun 24 02:59:44 PDT 2003


On Tue, 2003-06-24 at 09:08, Michael Härtel wrote:
> ---- snip! ----
> 
> $obj_map = ms_newMapObj($mapfile_path.$map_file);
> $layer=$obj_map->getlayerbyName('boundaries');
> $str_expression="('[country_name]' = 'germany')";
                                    ^^^

The example in the mapfile docs show the word 'eq' (for 'equals') in a
string comparison example. Things like '=', '<' and so on are for
numbers.

The column names on .dbf files are limited to 8 characters and may only
be capitals.

> $obj_class->setExpression($str_expression);
> $obj_class=$querylayer->getclass(0);
            ^^^^^^^^^^^^^

A few lines above your layer was called $layer, not $querylayer.



hth,

thorsten




More information about the MapServer-users mailing list