[Mapserver-users] php mapscript ms_newLayerObject and no mapfile
Daniel Morissette
morissette at dmsolutions.ca
Mon Dec 15 07:05:21 PST 2003
aaronkoning at shaw.ca wrote:
> -----HTML/MAPSCRIPT---------
>
> <?php
>
> dl('php_mapscript.so');
>
> $map_path="/var/www/html/test/mapscript/t/";
> $map = ms_newMapObj($map_path."europe.map");
>
> $layer = ms_newLayerObj($map);
> $layer->set("name","world");
> $layer->set("type","MS_LAYER_POLYGON");
> $layer->set("status","MS_ON");
> $layer->set("data","europe");
>
The constants in the statements above should *not* be inside quotes. You
should use:
$layer->set("type", MS_LAYER_POLYGON );
$layer->set("status", MS_ON );
Daniel
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the MapServer-users
mailing list