Swig and Perl - problem?

Ethan Alpert ealpert at DIGITALGLOBE.COM
Fri Jan 14 17:57:43 EST 2005


On a somewhat related note if you're in a CGI and want to return the
image directly as output use Slurp.pm

. . .

print $q->header(-type=>'image/png');

. . .

$img = $map->draw();

$img->save($out);

$myimg = Slurp::to_scalar($out);

print $myimg;


I like this approach better in somecases than returning the path to the
image. 


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Tyler Mitchell
Sent: Thursday, January 13, 2005 11:20 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Swig and Perl - problem?


> # Create an imgObj that has an image of the map
> $mapimage = $mapobject->{draw};
> ...

Tyler, you need to learn Perl before attempting to use Perl/MapScript.
Changing the above will work like:

$mapimage = $mapobject->draw();

What were you thinking man?



More information about the mapserver-users mailing list