[Mapserver-users] problem with Layer on-fly with MapServer 4
Daniel Morissette
morissette@dmsolutions.ca
Sat, 06 Dec 2003 13:40:06 -0500
collao_andres wrote:
> hi, i have the following code in PHP/MapScript
>
> dl('php_mapscript.so');
> // Default values and configuration
> $gpoMap_path="/usr/local/apache2/htdocs/test/data/";
> $gpoMap = ms_newMapObj($gpoMap_path."base.map");
>
> $layer_tmp=ms_newLayerObj($gpoMap);
> $layer_tmp->set('name','cuencas');
> $layer_tmp->set('status',MS_On);
Constant names are case-sensitive. You should use MS_ON in the line above.
If your layer still doesn't show up after that change then try doing a
$gpoMap->save("/tmp/test.map") just before your draw() call and then
check that the layer definition in the saved mapfile looks the way you
expect.
Daniel
--
------------------------------------------------------------
Daniel Morissette morissette@dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users