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

Michael Härtel mhaerte1@gwdg.de
Tue, 24 Jun 2003 09:08:09 +0200


Hello all,

for some reason i'm unable to modify the attributes of layers in runtime 
  to achieve a different map display.

The map always matches the attribut definitions in the map file, no 
matter which attributes i change.

My code is:

---- snip! ----

$obj_map = ms_newMapObj($mapfile_path.$map_file);
$layer=$obj_map->getlayerbyName('boundaries');
$str_expression="('[country_name]' = 'germany')";
$obj_class->setExpression($str_expression);
$obj_class=$querylayer->getclass(0);
$obj_color=$obj_class->label->outlinecolor;
$obj_color->setrgb(0,0,255);
$layer->set(status, MS_ON);

---- snip! ----

$image=$obj_map->draw();
$image_url=$image->saveWebImage(MS_PNG,1,1,0);

I guess there are some basic errors in my code.
Can somebody tell me how to tell MapServer that the modified layer 
should be drawn instead of the layer defined in the mapfile?

Thanks a lot,

Michael



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