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

Thorsten Fischer thfischer@mapmedia.de
24 Jun 2003 11:59:44 +0200


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

_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users