Hi Bart, what a luck that there's a workaround. Unluckily i'm not a php crack :o/ Could you please tell in a few catchwords how to apply the script? Thanks Albrecht
> -----Ursprüngliche Nachricht----- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 7. August 2008 09:52 > An: Weiser, Albrecht (HZD) > Cc: [email protected] > Betreff: Re: [mapserver-users] How do i define my SLD inside > the mapfile? > > No you can't use an SLD directly in a WMS server MAP file. > > What I normally do is apply the SLD to the MAP file using a simple PHP > script: > > #!/bin/sh > sudo -u apache php -f $0 $*; exit $? > > <?php > > if ($argc != 4) { > echo "Usage: applysldurl.php <input MAP file> <SLD url> <output MAP > file>\n"; > echo "\n"; > echo "Applies the SLD url to the layers in the MAP file\n"; > echo "\n"; > exit(1); > } > > $oMap = ms_newMapObj($argv[1]); > $oMap->applySLDURL($argv[2]); > $oMap->save($argv[3]); > > echo "Output saved to $argv[3]\n"; > > ?> > > Best regards, > Bart _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
