[Mapserver-users] PHP MapScript: dynamically add new layer ?

Lars V. Nielsen LVN at gispro.dk
Wed Dec 4 09:45:20 EST 2002


This is a multi-part message in MIME format.

------=_NextPart_000_0083_01C29BAC.2699F7A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi list,

I'm sure I'm missing something obvious here, so bear with me.

I'm trying to create and populate a new layer dynamically, and adding it to the map. It executes errorless, but yields no result.
If I add the wanted content statically in the map file, it comes out as expected.

My code's as follows:

$map = ms_newMapObj($map_path.$map_file);

$lyr = ms_newLayerObj($map);
$lyr->name = "myLayer";
$lyr->type = MS_LAYER_RASTER;
$lyr->status = MS_ON;
$lyr->data = "myRasterPicture.jpg";

$image=$map->draw();
$image_url = $image->saveWebImage(MS_GIF,1,1,0);

Please help to enligthen my ignorance. I'm still on game level 1 :-)

Best regards/Med venlig hilsen
Lars V. Nielsen
GisPro, Denmark
http://www.gispro.dk/
http://hjem.get2net.dk/lars-online/
WGS84: 10.20'40"E 55.20'20"N

------=_NextPart_000_0083_01C29BAC.2699F7A0
Content-Type: text/x-vcard;
	name="Lars hos GisPro.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="Lars hos GisPro.vcf"

BEGIN:VCARD
VERSION:2.1
N:Nielsen;Lars;V.
FN:Lars hos GisPro
ORG:GisPro
TITLE:Company Manager
TEL;WORK;VOICE:+45 70 23 9876
TEL;WORK;FAX:+45 6595 9877
ADR;WORK:;;Ugletoften 309;Odense S;;DK-5260;Denmark
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Ugletoften 309=0D=0AOdense S DK-5260=0D=0ADenmark
X-WAB-GENDER:2
URL;HOME:http://hjem.get2net.dk/lars-online/
URL;WORK:http://www.gispro.dk
EMAIL;PREF;INTERNET:lvn at gispro.dk
REV:20021204T144520Z
END:VCARD

------=_NextPart_000_0083_01C29BAC.2699F7A0--




More information about the mapserver-users mailing list